//-------------------------------------------------------------- // 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"); }
//-------------------------------------------------------------- // 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 } }
//-------------------------------------------------------------- // Use this for initialization void Start() { //Add cash collected listener to listen for win condition Notifications.AddListener(this, "CashCollected"); }