예제 #1
0
    /// <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);
    }
예제 #2
0
 public void On(OnPlayerRespawned message) => enabled = true;