protected virtual BattleAction TakeAction() { IAction action = ThisEntity.ChooseAction(); BattleAction battleAction = TakeAction(action); return(battleAction); }
protected virtual BattleAction TakeAction(IAction action) { BattleEntity battleTarget = currentScene.GetOpponent(this); Character target = battleTarget.ThisEntity; BattleAction battleAction = new BattleAction(this.ThisEntity, target, action); return(battleAction); }
public virtual void Update() { if (shouldAct) { BattleAction actionToAdd = TakeAction(); currentScene.QueueAction(actionToAdd); shouldAct = false; } }
private void OnActionChosen(IAction actionChosen) { BattleEntity target; if (actionChosen is ISelfTargetAction) { target = this; } else { target = currentScene.GetOpponent(this); } BattleAction action = new BattleAction(this.ThisEntity, target.ThisEntity, actionChosen); currentScene.QueueAction(action); hasFinishedAction = true; }