Пример #1
0
    // Update is called once per frame
    void Update()
    {
        if (GetAge() >= deathAge)
        {
            PlayDeath();
        }

        PayTaxes();

        DoAction();

        if (!ActionAcomplished())
        {
            return;
        }

        if (HasJob())
        {
            workingRole.ActionAccomplished(this);
        }
        else
        {
            SetRandomAction();
        }
    }