Exemple #1
0
    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);
    }
Exemple #2
0
        protected virtual void Update()
        {
            if (Behavior != null)
            {
                if (Blackboards == null)
                {
                    Blackboards = new BlackboardCache();
                }

                if (Result == BehaviorTree.ResultCode.Running)
                {
                    Result = Behavior.Act(this);
                }
            }
        }
Exemple #3
0
 public override void Update()
 {
     DuckStates = Flock.DuckStates;
     Behavior.Act(DuckStates);
 }