// Use this for initialization void Start() { this._initCommonGui(); CommonMenuUtilities.forceMainMenuDimensions(); //Debug.Log (Screen.width + "," + Screen.height); //Debug.Log (this._mainMenuWidth + "," + this._mainMenuHeight); //Check if there's existing persistent info, just in case. So we don't have two //This would happen when restarting the game GameObject ExistingPersistentInfo = GameObject.Find("PersistentInfo"); if (ExistingPersistentInfo != null) { Destroy(ExistingPersistentInfo); } }
// 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(); }