Exemplo n.º 1
0
 private void ButtonPressed(int id)
 {
     if (id == weapBtn.Id)
     {
         wm.SetDraw(!wm.draw);
     }
     else if (id == exitBtn.Id)
     {
         CameraHandler camhandl = GameObject.Find("CameraHandler").GetComponent <CameraHandler>();
         camhandl.ActivateMainCam();
     }
 }
Exemplo n.º 2
0
	public TutorialMenu (Rect area)
	{
		a = area;
		wm = new TutorialWeaponMenu(new Rect(a.width, 0, a.width, a.height));
		wm.SetDraw(false);

		float xOff = 0.0f;//0.15f * a.width;
		float yOff = 0.0f;//0.02f * a.height;
		float btnWidth = a.width - 2*xOff;
		float btnHeight = 0.05f * a.height; 

		Rect btnrec = new Rect(a.x + xOff, a.y + yOff, btnWidth, btnHeight);  

		weapBtn = new MenuButton(btnrec, "weapons", ButtonPressed);
		weapBtn.SetDraw(true);

		btnrec = new Rect(btnrec.x, btnrec.y + btnHeight + yOff, btnWidth, btnHeight);
		exitBtn = new MenuButton(btnrec, "exit", ButtonPressed);
		exitBtn.SetDraw(true);
	}
Exemplo n.º 3
0
    public TutorialMenu(Rect area)
    {
        a  = area;
        wm = new TutorialWeaponMenu(new Rect(a.width, 0, a.width, a.height));
        wm.SetDraw(false);

        float xOff      = 0.0f;   //0.15f * a.width;
        float yOff      = 0.0f;   //0.02f * a.height;
        float btnWidth  = a.width - 2 * xOff;
        float btnHeight = 0.05f * a.height;

        Rect btnrec = new Rect(a.x + xOff, a.y + yOff, btnWidth, btnHeight);

        weapBtn = new MenuButton(btnrec, "weapons", ButtonPressed);
        weapBtn.SetDraw(true);

        btnrec  = new Rect(btnrec.x, btnrec.y + btnHeight + yOff, btnWidth, btnHeight);
        exitBtn = new MenuButton(btnrec, "exit", ButtonPressed);
        exitBtn.SetDraw(true);
    }