| 123456789101112131415161718192021222324252627282930313233 |
- 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<Creature> combatants) {
- List<Creature> 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() {
- }
- }
- }
|