Esempio n. 1
0
        void DeductHealth(int healthToDeduct)
        {
            health -= healthToDeduct;

            CheckIfHealthLow();

            if (health <= 0 && isExploding)
            {
                isExploding = true;
                destructibleMaster.CallEventDestroyMe();
            }
        }
Esempio n. 2
0
        IEnumerator BeginExplosionTimer()
        {
            yield return(new WaitForSeconds(waitTime));

            destructibleMaster.CallEventDestroyMe();
        }