void Awake() //when the game starts { //canvasParent = GameObject.Find("Canvas"); GainsTextHandler.Initialize(); // Activates the floating reputation gain element if (gameController == null) //if there is no gamecontroller { if (SceneManager.GetActiveScene().name == "MobileScene") { mobileVersionInUse = true; } else { keysEnabled = true; } //// !! DISABLED FOR DEBUGGIN !! for (int i = 0; i < allSwitches.Count; i++) // At the start of the game, make sure all switches are set to false. { allSwitches[i] = false; } allSwitches[1] = true; // Enable for cigarrete box //DontDestroyOnLoad(gameObject); //the gamecontroller won't reset when switching scenes gameController = this; //this gamecontroller will be the gamecontroller punksRep = 0; //player's reputation among factions starts at zero irsRep = 0; shakersRep = 0; guardsRep = 0; day = 1; //the game starts at day 1 cigaretteCount = 0; schedule = 3; //Sets intro time //the day begins with the first activity in the schedule waitingForPPS = false; waitingForSFX = false; cleaningUpFades = false; dayChangeCardDisplayed = false; //GetNextCard(); } else if (gameController != this) //in case of unwanted extra gamecontrollers { Destroy(gameObject); //delete them } }
public bool dayChangeCardDisplayed; //bool used to execute day change card void Awake() //when the game starts { //canvasParent = GameObject.Find("Canvas"); GainsTextHandler.Initialize(); // Activates the floating reputation gain element if (gameController == null) //if there is no gamecontroller { //// !! DISABLED FOR DEBUGGIN !! for (int i = 0; i < allSwitches.Count; i++) // At the start of the game, make sure all switches are set to false. { allSwitches[i] = false; } allSwitches[1] = true; // Enable for cigarrete box //DontDestroyOnLoad(gameObject); //the gamecontroller won't reset when switching scenes gameController = this; //this gamecontroller will be the gamecontroller punksRep = 0; //player's reputation among factions starts at zero irsRep = 0; shakersRep = 0; guardsRep = 0; day = 1; //the game starts at day 1 cigaretteCount = 0; schedule = 3; //Sets intro time //the day begins with the first activity in the schedule SetBackgroundAudio(); AddLogEvent(); topBar = cardDisplay.topBar; logCurrentDayText = cardDisplay.logPageDayText; waitingForPPS = false; waitingForSFX = false; cleaningUpFades = false; GetComponent <OptionsSliders>().LoadSettings(); dayChangeCardDisplayed = false; //GetNextCard(); } else if (gameController != this) //in case of unwanted extra gamecontrollers { Destroy(gameObject); //delete them } }