public void PrintReputations(int optionIndex) // Create's a floating reputation gain text from given option. { switch (optionIndex) { case 1: GainsTextHandler.CreateGainsText(new int[] { currentCard.option1IrsReputation, currentCard.option1PunkReputation, currentCard.option1ShakeReputation, currentCard.option1GuardReputation }, cardDisplay.popUp.transform); break; case 2: GainsTextHandler.CreateGainsText(new int[] { currentCard.option2IrsReputation, currentCard.option2PunkReputation, currentCard.option2ShakeReputation, currentCard.option2GuardReputation }, cardDisplay.popUp.transform); break; case 3: GainsTextHandler.CreateGainsText(new int[] { currentCard.option3IrsReputation, currentCard.option3PunkReputation, currentCard.option3ShakeReputation, currentCard.option3GuardReputation }, cardDisplay.popUp.transform); break; case 4: GainsTextHandler.CreateGainsText(new int[] { currentCard.option4IrsReputation, currentCard.option4PunkReputation, currentCard.option4ShakeReputation, currentCard.option4GuardReputation }, cardDisplay.popUp.transform); break; case 5: GainsTextHandler.CreateGainsText(new int[] { currentCard.option5IrsReputation, currentCard.option5PunkReputation, currentCard.option5ShakeReputation, currentCard.option5GuardReputation }, cardDisplay.popUp.transform); break; } }
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 } }