//for ingame ui buttons controls
    public void OnButtonClick(string ButtonName)
    {
        switch (ButtonName)
        {
        //for pause button
        case "Pause":
            Time.timeScale = 0;
            Pausemenu.SetActive(false);
            ResumeMenuParent.SetActive(true);
            infomenu.SetActive(false);
            SoundController.Static.PlayClickSound();             //for click sound
            break;

        //for resume button
        case "Resume":
            Time.timeScale = 1;
            ResumeMenuParent.SetActive(false);
            Pausemenu.SetActive(true);
            infomenu.SetActive(true);
            SoundController.Static.PlayClickSound();             //for click sound
            break;

        //for playagain button
        case "PlayAgain":
            Application.LoadLevelAsync(Application.loadedLevelName);             //for game re loaded
            Time.timeScale = 1;
            ResumeMenuParent.SetActive(false);
            GameEndMenuParent.SetActive(false);
            SoundController.Static.PlayClickSound();             //for click sound
            print("play btn Clicked");
            break;

        //for home button
        case "Home":
            Application.LoadLevelAsync("MainMenu");             //for mainmenu scene
            ResumeMenuParent.SetActive(false);
            SoundController.Static.PlayClickSound();            //for click sound
            break;

        //for Facebook button
        case "FbLike":

            string fbUrl = "https://www.facebook.com/AceGamesHyderabad"; //for open acegame fb page
            Application.OpenURL(fbUrl);                                  //for open acegame fb page

            SoundController.Static.PlayClickSound();                     //for click sound
            break;
        }
    }
示例#2
0
 public void GameEnd()
 {
     GameEndMenuParent.SetActive(true);
     HUD.SetActive(false);
     continueScreen.SetActive(false);
 }
 // for score card enable
 void ScoreCardEnabled()
 {
     GameEndMenuParent.SetActive(true);
 }