// Use this for initialization void Start() { this._initCommonGui(); this._boxWidth = CommonMenuUtilities.forceDimensions(this._boxWidth, this._minWidth, this._maxWidth); this._boxHeight = CommonMenuUtilities.forceDimensions(this._boxHeight, this._minHeight, this._maxHeight); //Debug.Log("Briefing width: " + this._boxWidth); //Debug.Log("Briefing height: " + this._boxHeight); PersistentInfo Persistence = GameObject.Find("PersistentInfo").GetComponent <PersistentInfo>(); this.InterludeText = Resources.Load("Texts/Interludes/" + Persistence.sceneName) as TextAsset; //Debug.Log ("Briefings/" + Persistence.sceneName); this.BriefingTexture = Resources.Load("Briefings/" + Persistence.sceneName) as Texture2D; this._ContinueResponseFunction = _loadNextScene; //Special exception scenes if (Persistence.sceneName == "Ending") { this._ContinueResponseFunction = _loadMainMenu; } else if (Persistence.sceneName == "Defeat") { this._ContinueResponseFunction = _loadMainMenu; } }
// Use this for initialization void Start() { this._initCommonGui(); this._boxWidth = CommonMenuUtilities.forceDimensions(this._boxWidth, this._maxWidth, this._maxWidth); this._boxHeight = CommonMenuUtilities.forceDimensions(this._boxHeight, this._maxHeight, this._maxHeight); GameObject LevelInfoObj = GameObject.Find("LevelInfo"); if (LevelInfoObj != null) { this._LevelInformations = LevelInfoObj.GetComponent <LevelInfo>(); } else { //For debugging really this._LevelInformations = new LevelInfo(); } //Technically this is all paused Time.timeScale = 0; //Debug.Log("PostGame width: " + this._boxWidth); //Debug.Log("PostGame height: " + this._boxHeight); if (this._LevelInformations.gameEvent == LevelInfo.GAME_EVENT_PLAYER_WON) { this._title = "YOU ARE VICTORIOUS"; this._ContinueResponseFunction = _loadNextScene; } else { this._title = "YOU HAVE BEEN DEFEATED"; this._ContinueResponseFunction = _loadDefeatScene; } }