Beispiel #1
0
        public void Dead()
        {
            dead = true;

            float delay = 0;

            if (deadEffectObj != null)
            {
                ObjectPoolManager.Spawn(deadEffectObj, targetPoint.position, thisT.rotation);
            }

            if (unitC != null)
            {
                delay = unitC.CreepDestroyed();
            }
            if (unitT != null)
            {
                unitT.Destroy();
            }

            if (supportRoutineRunning)
            {
                UnbuffAll();
            }

            if (onDestroyedE != null)
            {
                onDestroyedE(this);
            }

            StartCoroutine(_Dead(delay));
        }