Exemplo n.º 1
0
        void setTheDeathType()
        {
            switch(m_deathType) {
            case DEATHYPE.None:
                m_deathTypeDelegate = DeathByNone;
                break;

            case DEATHYPE.Sleep:
                m_deathTypeDelegate = DeathBySleeping;
                break;

            case DEATHYPE.Destroy:
                m_deathTypeDelegate = DeathByDestruction;
                break;
            }

            StartCoroutine(myTimeIsOver(m_timeTillDeath,m_deathTypeDelegate));
        }
Exemplo n.º 2
0
 IEnumerator myTimeIsOver(float p_sec,deathTypeDelegate p_del )
 {
     yield return new WaitForSeconds(p_sec);
     p_del();
 }