Пример #1
0
    internal void GotEaten()
    {
        AgentsDeathsHandler deathsHandler = transform.parent.gameObject.GetComponent("AgentsDeathsHandler") as AgentsDeathsHandler;

        deathsHandler.AgentWasEaten((agentsManager.GetComponent("TimeDistribution") as TimeDistribution).DaysPassed - dateBorn);

        KillItself();
    }
Пример #2
0
    internal void GotEaten()
    {
        if (canBeEaten && isNight)
        {
            AgentsDeathsHandler deathsHandler = transform.parent.gameObject.GetComponent("AgentsDeathsHandler") as AgentsDeathsHandler;
            deathsHandler.AgentWasEaten(timeDistribution.DaysPassed - dateBorn);

            KillItself();
        }
    }