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

        StateName = "Chasing food";
    }
Exemplo n.º 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)
        };
    }