コード例 #1
0
    //--------------------------------------------------------------
    // Use this for initialization
    void Start()
    {
        //Add cash collected listener to listen for win condition
        Notifications.AddListener(this, "CashCollected");

        //Add listeners for main menu
        Notifications.AddListener(this, "RestartGame");
        Notifications.AddListener(this, "ExitGame");
    }
コード例 #2
0
    //--------------------------------------------------------------
    // Use this for initialization
    void Start()
    {
        //Add cash collected listener to listen for win condition
        Notifications.AddListener(this, "CashCollected");

        //Add game menu listeners
        Notifications.AddListener(this, "RestartGame");
        Notifications.AddListener(this, "ExitGame");
        Notifications.AddListener(this, "SaveGame");
        Notifications.AddListener(this, "LoadGame");

        //If we need to load level
        if (bShouldLoad)
        {
            StateManager.Load(Application.persistentDataPath + "/SaveGame.xml");
            bShouldLoad = false;           //Reset load flag
        }
    }
コード例 #3
0
 //--------------------------------------------------------------
 // Use this for initialization
 void Start()
 {
     //Add cash collected listener to listen for win condition
     Notifications.AddListener(this, "CashCollected");
 }