using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; namespace RPG_Fight_Test.Assets.Scripts.Creatures { public class Skeleton : Creature { private void Start() { Dex = Random.Range(0, 20); } public void DecideActions(List combatants) { List closeEnemies = EnemiesInSquareNextToCreature(this, combatants); Debug.Log("Number of close enemies " + closeEnemies.Count); if (closeEnemies.Count > 0) { if (!HasFirstAction()) { SetFirstAction(new AttackAction(closeEnemies[0])); } else { SetSecondAction(new AttackAction(closeEnemies[0])); } } else { /*if (shouldMove()) { setFirstAction(new MoveAction()); }*/ } } public void ShowInfo() { } } }