void BackToMainMenuCreator () {
				string buttonName = "Bact to Main Menu";
				GameObject statsButton = AddButtonOnly ();
				ButtonOverlord bo = statsButton.GetComponent<ButtonOverlord> ();
				bo.buttonType = MenuID.MENU_BUTTON;
				bo.buttonAction = MenuID.PAUSE_EXIT;		
				bo.buttonLocation = MenuID.PAUSE_BUTTON;
				bo.SetIsSelectable (true);
				bo.Start ();
				bo.ChangeText (buttonName);
				bo.transform.parent = subMenuHolder.transform;
				bo.transform.localPosition = new Vector3 (0, -3f, 0);
				bo.name = buttonName;
				statsButton.AddComponent ("BoxCollider");
		}
Exemple #2
0
    void CreditExit()
    {
        string         buttonName  = "Exit";
        GameObject     statsButton = AddButtonOnly();
        ButtonOverlord bo          = statsButton.GetComponent <ButtonOverlord> ();

        bo.buttonType     = MenuID.MENU_BUTTON;
        bo.buttonAction   = MenuID.CREDITS_EXIT;
        bo.buttonLocation = MenuID.CREDITS_MENU_BUTTON;
        bo.SetIsSelectable(true);
        bo.Start();
        bo.ChangeText(buttonName);
        bo.transform.parent        = subMenuHolder.transform;
        bo.transform.localPosition = new Vector3(0, -4f, 0);
        bo.name = buttonName;
        statsButton.AddComponent("BoxCollider");
    }
    private void ExitButtonCreator()
    {
        string         buttonName = "Exit";
        GameObject     exitButton = AddButtonOnly();
        ButtonOverlord bo         = exitButton.GetComponent <ButtonOverlord> ();

        bo.buttonType     = MenuID.MENU_BUTTON;
        bo.buttonAction   = MenuID.STATS_EXIT;
        bo.buttonLocation = MenuID.STATS_BUTTON;
        bo.SetIsSelectable(true);
        bo.Start();
        bo.ChangeText(buttonName);
        bo.transform.parent        = subMenuHolder.transform;
        bo.transform.localPosition = new Vector3(0, -2f, 0);
        bo.name = buttonName;
        exitButton.AddComponent("BoxCollider");
    }
    void CreditButtonCreator()
    {
        string         buttonName    = "Credits";
        GameObject     optionsButton = AddButtonOnly();
        ButtonOverlord bo            = optionsButton.GetComponent <ButtonOverlord> ();

        bo.buttonType     = MenuID.MENU_BUTTON;
        bo.buttonAction   = MenuID.START_CREDITS;
        bo.buttonLocation = MenuID.START_MENU_BUTTON;
        bo.Start();
        bo.ChangeText(buttonName);
        bo.transform.parent        = subMenuHolder.transform;
        bo.transform.localPosition = new Vector3(0, -0.5f, 0);
        bo.name = buttonName;
        optionsButton.AddComponent("BoxCollider");
        bo.SetIsSelectable(true);
    }
    void NewGameButtonCreator()
    {
        string         buttonName    = "New Game";
        GameObject     newGameButton = AddButtonOnly();
        ButtonOverlord bo            = newGameButton.GetComponent <ButtonOverlord> ();

        bo.buttonType     = MenuID.GAME_BUTTON;
        bo.buttonAction   = MenuID.START_PLAY;
        bo.buttonLocation = MenuID.START_MENU_BUTTON;
        bo.Start();
        bo.ChangeText(buttonName);
        bo.transform.parent        = subMenuHolder.transform;
        bo.transform.localPosition = new Vector3(0, 4f, 0);
        bo.name = buttonName;
        newGameButton.AddComponent("BoxCollider");
        bo.SetIsSelectable(true);
    }
Exemple #6
0
    void ButtonsButtonCreator()
    {
        string         buttonName  = "Buttons";
        GameObject     musicButton = AddButtonOnly();
        ButtonOverlord bo          = musicButton.GetComponent <ButtonOverlord> ();

        bo.text           = buttonName + ": A/B";
        bo.textOriginal   = buttonName + ": A/B";
        bo.textChange     = buttonName + ": B/A";
        bo.buttonType     = MenuID.MENU_BUTTON;
        bo.buttonAction   = MenuID.OPTIONS_BUTTON;
        bo.buttonLocation = MenuID.OPTIONS_BUTTON;
        bo.SetIsSelectable(true);
        bo.Start();
        bo.ChangeText(bo.text);
        bo.transform.parent        = subMenuHolder.transform;
        bo.transform.localPosition = new Vector3(0, -1f, 0);
        bo.name = buttonName;
        musicButton.AddComponent("BoxCollider");
    }