public void Die() { isDead = true; GameController.instance.score = GameController.instance.score + 100; GameController.instance.UpdateScore(); animator.Play("dead", 0); alienDissolve.TriggerDissolve(); Destroy(this.gameObject, 5f); }
public override void OnDeath() { if (dead) { return; } one.TriggerDissolve(); two.TriggerDissolve(); StartCoroutine("StopRotating"); Spawner.RemoveEnemy(this); //--Spawner.EnemyCount; Destroy(this.transform.parent.gameObject, 5f); }