/// <summary> /// Processes resulting logic from the player being respawned /// </summary> public void PlayerRespawned() { // Invoke the player respawned action if it has methods subscribed to it OnPlayerRespawned?.Invoke(); // Re-enable the platform manager and move the starting segment into position PlatformManager.current.EnablePlatforms(); PlatformManager.current.gameObject.SetActive(true); // Re-enable the player and reset the coin count player.SetActive(true); CoinsCollected = 0; uiCoinsCollectedLabel.text = CoinsCollected.ToString(); // Disable the gameover screen uiGameover.SetActive(false); SwitchGameMusic(musicClipGameplay); }
public void On(OnPlayerRespawned message) => enabled = true;