void PlayerDamage(PulseController missile) { if (missile) { health -= missile.GetDamage(); missile.Hit(); if (health <= 0) { Destroy(gameObject); levelManager.LoadLevel("Win Screen"); } } }
void EnemyDamage(PulseController missile) { print(enemyValue); if (missile) { health -= missile.GetDamage(); missile.Hit(); if (health <= 0) { Destroy(gameObject); enemySounds.PlayEnemyDying(); scoreKeeper.HitScore(enemyValue); } } }