private void OnPlayerLostLive() //mainly or ONLY stuff for PlayerManager... not rly relevent to GameLogic BESIDES Player LIFE count... { livesLeft -= 1; OnPlayerLivesChanged?.Invoke(livesLeft); if (livesLeft > 0) { OnRespawnPlayer?.Invoke(); } }
void AddLive() { livesLeft += 1; if (livesLeft > 250) // https://en.wikipedia.org/wiki/Asteroids_(video_game)#:~:text=Asteroids%20contains%20several%20bugs.,than%20250%20lives%20are%20collected. { livesLeft = 0; } OnPlayerLivesChanged?.Invoke(livesLeft); AudioSource.PlayClipAtPoint(playerGainedLive, gameObject.transform.position); }
private void ResetPlayerLiveCount() { livesLeft = GameConfig.PlayerLiveCountAtStart; OnPlayerLivesChanged?.Invoke(livesLeft); }