Пример #1
0
    void SubscribeToGameSceneEvents()
    {
        // Make sure the game over and player won events don't have any
        // listeners before adding any
        GameOver.RemoveAllListeners();
        PlayerWon.RemoveAllListeners();

        GameOver.AddListener(resetGameState);
        PlayerWon.AddListener(victorySequence);

        player.statusEvents.Died.AddListener(deathSequence);
    }
Пример #2
0
 public void AddPlayerWonListener(UnityAction listener)
 {
     playerWon.AddListener(listener);
 }