private void Update() { if (!isInit) { return; } if (!IsAlive) { return; } timer += Time.deltaTime; if (timer >= Skill.Data.LifeSpan) { missileHitHandler.Fade(this); specialEffectHandler.CreateDestroyEffect(null, this, deathEffect); Death(); } }
void Death() { IsAlive = false; specialEffectHandler.CreateDestroyEffect(Caster, this, deathEffect); if (Enemy != null) { trackSystem?.StopTracking(); } Gamef.MissileClear(ID); Gamef.Destroy(gameObject); }