void Awake() { if( mInstance != null ) { Debug.LogError( string.Format( "Only one instance of GameAgent allowed! Destroying:" + gameObject.name +", Other:" + mInstance.gameObject.name ) ); return; } mInstance = this; }
void Start() { textStyle = FontAgent.GetTextStyle(); newMonRect = new Rect(0f, Screen.height / 4f, Screen.width, Screen.height / 4f); vsRect = new Rect(0f, 0f, Screen.width, Screen.height); currentMonRect = new Rect(0f, Screen.height * 2f / 4f, Screen.width, Screen.height / 4f); }
void Awake() { if (mInstance != null) { Debug.LogError(string.Format("Only one instance of FontAgent allowed! Destroying:" + gameObject.name + ", Other:" + mInstance.gameObject.name)); Destroy(gameObject); return; } mInstance = this; }
void Start() { textStyle = FontAgent.GetTextStyle(); textRect = new Rect(0f, Screen.height * 2f / 3f, Screen.width, Screen.height / 3f); }