Beispiel #1
0
    public ChasingFood(Animal animal) : base(animal.gameObject)
    {
        _animal     = animal;
        _energyLost = _animal.GetEnergyLostPerTick();
        _debug      = GameObject.FindObjectOfType <PathfindingDebug>();

        StateName = "Chasing food";
    }
Beispiel #2
0
    public GoingForMate(Animal animal) : base(animal.gameObject)
    {
        _animal     = animal;
        _energyLost = _animal.GetEnergyLostPerTick();
        _debug      = GameObject.FindObjectOfType <PathfindingDebug>();

        StateName = "Going for mate";

        _availableStates = new List <Type> {
            typeof(Exploring), typeof(GoingForMate), typeof(Mating)
        };
    }