// 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; } }
// Use this for initialization void Start() { this._initCommonGui(); this.TimeOfDay = this.Sun; GameObject LevelInfoObj = GameObject.Find("LevelInfo"); this.LevelInformation = LevelInfoObj.GetComponent <LevelInfo>(); GameObject CameraObj = GameObject.Find("MainCamera"); this.Camera = CameraObj.GetComponent <CameraMovement> (); this._Player = GameObject.Find("Player").GetComponent <Player>(); this._generalStatsWidth = CommonMenuUtilities.forceDimensions(this._generalStatsWidth, this._generalStatsMinWidth, this._generalStatsMaxWidth); this._generalStatsHeight = CommonMenuUtilities.forceDimensions(this._generalStatsHeight, this._generalStatsMinHeight, this._generalStatsMaxHeight); this._squadBoxWidth = CommonMenuUtilities.forceDimensions(this._squadBoxWidth, this._squadBoxMinWidth, this._squadBoxMaxWidth); this._squadBoxHeight = CommonMenuUtilities.forceDimensions(this._squadBoxWidth, this._squadBoxMinHeight, this._squadBoxMaxHeight); this._gameEventWidth = CommonMenuUtilities.forceDimensions(this._gameEventWidth, this._gameEventMinWidth, this._gameEventMaxWidth); this._gameEventHeight = CommonMenuUtilities.forceDimensions(this._gameEventHeight, this._gameEventMinHeight, this._gameEventMaxHeight); Debug.Log("General stats width: " + this._generalStatsWidth); Debug.Log("General stats height: " + this._generalStatsHeight); Debug.Log("Squad box width: " + this._squadBoxWidth); Debug.Log("Squad box height: " + this._squadBoxHeight); Debug.Log("Game events width: " + this._gameEventWidth); Debug.Log("Game events height: " + this._gameEventHeight); CommonMenuUtilities.forceMainMenuDimensions(); }