Inheritance: MonoBehaviour
    void OnEnable()
    {
        Instance = this;
        InitExit();
//		SetWin ();
        ExitButton.AddListener(0, BtnPress);
    }
 private void Start()
 {
     aviao = FindObjectOfType <Aviao>();
     controlaDificuldade = FindObjectOfType <ControlaDificuldade>();
     geradorDeObstaculos = FindObjectOfType <GeradorDeObstaculos>();
     gameOverInterface   = FindObjectOfType <UIGameOver>();
     gameInterface       = FindObjectOfType <UIGameInterface>();
 }
    private void OnOpenUIFormSuccess(object sender, GameEventArgs e)
    {
        OpenUIFormSuccessEventArgs ne = (OpenUIFormSuccessEventArgs)e;

        if (ne.UIForm.Logic is UIPlayerOperate)
        {
            uiPlayerOperate = (UIPlayerOperate)ne.UIForm.Logic;
        }
        else if (ne.UIForm.Logic is UIPlayerMessage)
        {
            uiPlayerMessage = (UIPlayerMessage)ne.UIForm.Logic;
        }
        else if (ne.UIForm.Logic is UIGameOver)
        {
            uiGameOver = (UIGameOver)ne.UIForm.Logic;
        }
    }
Exemple #4
0
    void Awake()
    {
        instance = this;

        uiHUD           = gameObject.GetComponent <UIHUD>();
        uiOverlay       = gameObject.GetComponent <UIOverlay>();
        uiAbility       = gameObject.GetComponent <UIAbilityButtons>();
        uiPerkMenu      = gameObject.GetComponent <UIPerkMenu>();
        uiGameOver      = gameObject.GetComponent <UIGameOver>();
        uiUnitPlacement = gameObject.GetComponent <UIUnitPlacement>();

        //uiHUD.enabled=false;
        uiOverlay.enabled = false;
        //uiAbility.enabled=false;
        uiGameOver.enabled      = false;
        uiUnitPlacement.enabled = false;

        colorH = new Color(1f, .6f, 0f, 1f);
        colorN = new Color(1f, .85f, .75f, 1f);
        texBar = Resources.Load("Textures/Bar", typeof(Texture)) as Texture;
    }
Exemple #5
0
	void Awake(){
		
		instance=this;
		
		uiHUD=gameObject.GetComponent<UIHUD>();
		uiOverlay=gameObject.GetComponent<UIOverlay>();
		uiAbility=gameObject.GetComponent<UIAbilityButtons>();
		uiPerkMenu=gameObject.GetComponent<UIPerkMenu>();
		uiGameOver=gameObject.GetComponent<UIGameOver>();
		uiUnitPlacement=gameObject.GetComponent<UIUnitPlacement>();
		
		//uiHUD.enabled=false;
		uiOverlay.enabled=false;
		//uiAbility.enabled=false;
		uiGameOver.enabled=false;
		uiUnitPlacement.enabled=false;
		
		colorH=new Color(1f, .6f, 0f, 1f);
		colorN=new Color(1f, .85f, .75f, 1f);
		texBar=Resources.Load("Textures/Bar", typeof(Texture)) as Texture;
		
		
	}
 void OnDisble()
 {
     Instance = null;
     ExitButton.RemoveListener(BtnPress);
     //DestroyImmediate(this.gameObject);
 }
Exemple #7
0
 private void Awake()
 {
     _current  = this;
     _gameOver = GetComponentInChildren <UIGameOver>(true);
 }