Exemple #1
0
    public void RunAway()
    {
        animalMovement.FleeFrom(perceptor.GetDangers());
        Task.current.Succeed();

        communicator.SetSprite(runAwaySprite);
    }
Exemple #2
0
    public void SearchForFood()
    {
        if (perceptor.SeesFood)
        {
            Task.current.Succeed();
        }
        else
        {
            animalMovement.MoveRandom();
            Task.current.Fail();

            communicator.SetSprite(searchForFoodSprite);
        }
    }