示例#1
0
    void Start()
    {
        Scene  currentScene = SceneManager.GetActiveScene();
        string sceneName    = currentScene.name;

        StartCoroutine(LoadDropdown());

        if (sceneName == "SelectGameMode")
        {
            Button Nbtn = NormalBtn.GetComponent <Button>();
            Nbtn.onClick.AddListener(LoadNormalMode);

            Button Tbtn = TimeBtn.GetComponent <Button>();
            Tbtn.onClick.AddListener(LoadTimeAttackMode);

            Button Ibtn = InverseBtn.GetComponent <Button>();
            Ibtn.onClick.AddListener(LoadInverseMode);

            Button Abtn = AssignmentBtn.GetComponent <Button>();
            Abtn.onClick.AddListener(LoadAssignmentMode);

            Button Cbtn = CommunityBtn.GetComponent <Button>();
            Cbtn.onClick.AddListener(LoadCommunityMode);

            Button Bbtn = BackBtn.GetComponent <Button>();
            Bbtn.onClick.AddListener(LoadCharSelect);
        }
    }
示例#2
0
 //hides the main menu
 void hideMenu()
 {
     ClassicBtn.Hide();
     ExitBtn.Hide();
     HelpBtn.Hide();
     TimeBtn.Hide();
     multiplayerBtn.Hide();
     menuBack.Hide();
     HomeTLbl.Hide();
     boardHomeBtn.Show();
     TitleLbl.Show();
     if (gameMode == 2)
     {
         P1ScoreLbl.Show();
         P2ScoreLbl.Show();
         turnLbl.Show();
     }
 }
示例#3
0
        //shows the main menu
        void showMenu()
        {
            ClassicBtn.Invoke(new Action(() => ClassicBtn.Show()));
            ExitBtn.Invoke(new Action(() => ExitBtn.Show()));
            HelpBtn.Invoke(new Action(() => HelpBtn.Show()));
            multiplayerBtn.Invoke(new Action(() => multiplayerBtn.Show()));
            TimeBtn.Invoke(new Action(() => TimeBtn.Show()));
            menuBack.Invoke(new Action(() => menuBack.Show()));
            HomeTLbl.Invoke(new Action(() => HomeTLbl.Show()));
            boardHomeBtn.Invoke(new Action(() => boardHomeBtn.Hide()));
            CountdownLbl.Invoke(new Action(() => CountdownLbl.Hide()));
            TitleLbl.Invoke(new Action(() => TitleLbl.Hide()));

            if (gameMode == 2)
            {
                P1ScoreLbl.Invoke(new Action(() => P1ScoreLbl.Hide()));
                P2ScoreLbl.Invoke(new Action(() => P2ScoreLbl.Hide()));
                turnLbl.Invoke(new Action(() => turnLbl.Hide()));
            }
        }