public virtual void PerformAction(CommandSystem commandSystem) { if (TurnsAlerted != null && TurnsAlerted == 0 && !game.Player.inCombat(this)) { ChangeHealthBy(1); } if (Behavior == null) { Behavior = new StandardMoveAndAttack(); } Behavior.Act(this, commandSystem, game); }
protected virtual void Update() { if (Behavior != null) { if (Blackboards == null) { Blackboards = new BlackboardCache(); } if (Result == BehaviorTree.ResultCode.Running) { Result = Behavior.Act(this); } } }
public override void Update() { DuckStates = Flock.DuckStates; Behavior.Act(DuckStates); }