void Update() { this._mouseY = Screen.height-(int)Input.mousePosition.y; if(this._wScreenOld != Screen.width || this._hScreenOld != Screen.height) { this._wScreenOld = Screen.width; this._hScreenOld = Screen.height; this.UpdateRects(); } this._mouseItem = this.CalcMouseItem(); if(Input.GetMouseButtonDown(0)) { if(this._mouseItem == _itensGUI.ITENS) { if(this._buttonControl==50) { //novo jogo AutoFade.LoadLevel("Game", 2, 2, Color.black); }else if(this._buttonControl==100) { //controles this._telaControle = true; }else if(this._buttonControl==150) { //creditos this._telaCreditos = true; }else if(this._buttonControl==200) { //agradecimentos this._telaAgradecimentos = true; }else if(this._buttonControl==250) { //fechar Application.Quit(); } }else { this._telaControle = false; this._telaAgradecimentos = false; this._telaCreditos = false; } } }
void Start() { this._mouseItem = _itensGUI.NADA; this._buttonControl = 50; this._telaControle = false; this._telaCreditos = false; this._telaAgradecimentos = false; this._wScreenOld = Screen.width; this._hScreenOld = Screen.height; this._euphemia = (Font)Resources.Load("Fonts/euphemia"); this.UpdateRects(); }