Exemplo n.º 1
0
    //for buttons controll
    public void OnButtonClicked(string ButtonName)
    {
        switch (ButtonName)
        {
        //for starter pack
        case "Buy1":
            Debug.Log("button1 is Clicked");
            SoundController.Static.PlayClickSound();            //for click sound
            break;

        //for Extreme pack
        case "Buy2":
            Debug.Log("button2 is Clicked");
            SoundController.Static.PlayClickSound();            //for click sound
            break;

        //for gamer pack
        case "Buy3":
            Debug.Log("button3 is Clicked");
            SoundController.Static.PlayClickSound();            //for click sound
            break;

        //for back to the main menu
        case "Back":
            InAppMenuParent.SetActive(false);          //for inappmenu disables
            MainMenuParent.SetActive(true);            //for mainmenu enables
            SoundController.Static.PlayClickSound();   //for click sound
            break;
        }
    }
Exemplo n.º 2
0
    public void OnButtonClicked(string ButtonName)
    {
        SoundController.Static.PlayClickSound();
        switch (ButtonName)
        {
        case "Buy1":
            Debug.Log("button1 is Clicked");
            //SoundController.Static.PlayClickSound();
            break;

        case "Buy2":
            Debug.Log("button2 is Clicked");
            //SoundController.Static.PlayClickSound();
            break;

        case "Buy3":
            Debug.Log("button3 is Clicked");
            //SoundController.Static.PlayClickSound();
            break;

        case "Back":
            InAppMenuParent.SetActive(false);
            MainMenuParent.SetActive(true);
            //SoundController.Static.PlayClickSound();
            break;
        }
    }
Exemplo n.º 3
0
    public void OnButtonClick(string ButtonName)
    {
        switch (ButtonName)
        {
        case "Play":
            carSelection.SetActive(true);
            MainMenuParent.SetActive(false);
            SoundController.Static.PlayClickSound();
            break;

        case "Credits":
            SoundController.Static.PlayClickSound();
            CreditsObject.SetActive(true);
            MainMenuParent.SetActive(false);

            break;

        case "More":
            string url = "https://play.google.com/store/apps/developer?id=Ace+Games";
                                #if UNITY_ANDROID
            url = "https://play.google.com/store/apps/developer?id=Ace+Games";
                                #endif
                                #if UNITY_IPHONE
            url = "https://itunes.apple.com/us/app/jet-boat-rush/id877610071?ls=1&mt=8";
                                #endif
                                #if UNITY_WP8
            url = "http://www.windowsphone.com/en-in/store/app/jet-car-rush/b693c43c-dc64-4b03-b467-ee5821308fd3";
                                #endif
                                #if UNITY_WEBPLAYER
            url = "https://www.assetstore.unity3d.com/#publisher/920";
                                #endif
            Application.OpenURL(url);
            SoundController.Static.PlayClickSound();
            break;

        case "RateUs":
            string rateurl = "https://play.google.com/store/apps/developer?id=Ace+Games";
                                #if UNITY_ANDROID
            rateurl = "https://play.google.com/store/apps/details?id=com.Acegames.racer";
                                #endif
                                #if UNITY_IPHONE
            rateurl = "https://itunes.apple.com/us/app/f1-traffic-racer/id904284766?ls=1&mt=8";
                                #endif
                                #if UNITY_WP8
            rateurl = "http://www.windowsphone.com/en-in/store/app/jet-car-rush/b693c43c-dc64-4b03-b467-ee5821308fd3";
                                #endif
                                #if UNITY_WEBPLAYER
            rateurl = "https://play.google.com/store/apps/details?id=com.Acegames.racer";
                                #endif
            SoundController.Static.PlayClickSound();
            Application.OpenURL(rateurl);
            break;

        case "Quit":
            SoundController.Static.PlayClickSound();
            Application.Quit();
            break;
        }
    }
Exemplo n.º 4
0
 public void OnButtonClick(string ButtonName)
 {
     switch (ButtonName)
     {
     case "Back":
         CreditsMenuParent.SetActive(false);
         MainMenuParent.SetActive(true);
         SoundController.Static.playSoundFromName("Click");
         break;
     }
 }
Exemplo n.º 5
0
 //for button control
 public void OnButtonClick(string ButtonName)
 {
     switch (ButtonName)
     {
     //for back button
     case "Back":
         CreditsMenuParent.SetActive(false);        //for credits menu disables
         MainMenuParent.SetActive(true);            //for mainmenu enables
         SoundController.Static.PlayClickSound();   //for click sound
         break;
     }
 }
Exemplo n.º 6
0
    //for button control
    public void OnbuttonClick(System.Object buttonname, EventArgs args)
    {
        Debug.Log(" clicked on " + buttonname.ToString());
        switch (buttonname.ToString())
        {
        //for select button
        case "Play":
            //levelName = "NinjaGameplay";
            SoundController.Static.PlayClickSound();                                     //for click sound
            PlayerSelectionMenu.SetActive(true);
            PlayerGroup.SetActive(true);


            break;

        case "playGame":
            //levelName = "NinjaGameplay";
            SoundController.Static.PlayClickSound();             //for click sound
            Application.LoadLevel(1);


            break;

        //for previous button
        case "Previous":
            SoundController.Static.PlayClickSound(); //for click sound
            showPreviousPlayer();                    //for previos polayer information
            break;

        //for next button
        case "Next":
            SoundController.Static.PlayClickSound(); //for click sound
            showNextPlayer();                        //for next polayer information
            break;

        //for buy button
        case "Buy":
            SoundController.Static.PlayClickSound(); //for click sound
            PlayerGroup.SetActive(false);            //for player disable
            purchasePlayer();                        //for player purchase information
            //MainMenuScreens.currentScreen = MainMenuScreens.MenuScreens.UnSufficentCoinsMenu;//for moving unsufficent menu state
            break;

        //for back button
        case "Back":
            SoundController.Static.PlayClickSound();                                     //for click sound
            PlayerSelectionMenu.SetActive(false);
            PlayerGroup.SetActive(false);
            MainMenuParent.SetActive(true);             //for mainmenu enable
            break;
        }
    }
Exemplo n.º 7
0
    //for button control
    public void OnButtonClick(string ButtonName)
    {
        switch (ButtonName)
        {
        //for select button
        case "Select":
            //levelName = "NinjaGameplay";
            SoundController.Static.PlayClickSound();                                     //for click sound
            PlayerSelectionMenu.SetActive(false);
            PlayerGroup.SetActive(false);
            LoadingMenuParent.SetActive(true);
            Invoke("LategamePlay", 3f);                                              //for game play
            MainMenuScreens.currentScreen = MainMenuScreens.MenuScreens.Loadindmenu; //for moving loading menu state

            break;

        //for previous button
        case "Previous":
            SoundController.Static.PlayClickSound();                  //for click sound
            showPreviousPlayer();                                     //for previos polayer information
            break;

        //for next button
        case "Next":
            SoundController.Static.PlayClickSound();              //for click sound
            showNextPlayer();                                     //for next polayer information
            break;

        //for buy button
        case "Buy":
            SoundController.Static.PlayClickSound();                                          //for click sound
            PlayerGroup.SetActive(false);                                                     //for player disable
            purchasePlayer();                                                                 //for player purchase information
            MainMenuScreens.currentScreen = MainMenuScreens.MenuScreens.UnSufficentCoinsMenu; //for moving unsufficent menu state
            break;

        //for back button
        case "Back":
            SoundController.Static.PlayClickSound();                                     //for click sound
            PlayerSelectionMenu.SetActive(false);
            PlayerGroup.SetActive(false);
            MainMenuParent.SetActive(true);                                     //for mainmenu enable
            break;
        }
    }
Exemplo n.º 8
0
    public void OnButtonClicked(string ButtonName)
    {
        switch (ButtonName)
        {
        case "Buy1":
            if (staterPackEvent != null)
            {
                staterPackEvent(null, null);
            }
            Debug.Log("Statern Pack button clicked");

            SoundController.Static.playSoundFromName("Click");
            break;

        case "Buy2":
            if (extremPackEvent != null)
            {
                extremPackEvent(null, null);
            }
            Debug.Log("extrem Pack button clicked");
            SoundController.Static.playSoundFromName("Click");
            break;

        case "Buy3":
            if (gamerPackEvent != null)
            {
                gamerPackEvent(null, null);
            }
            Debug.Log("Game Pack button clicked");
            SoundController.Static.playSoundFromName("Click");
            break;

        case "Back":
            InAppMenuParent.SetActive(false);
            MainMenuParent.SetActive(true);
            SoundController.Static.playSoundFromName("Click");
            break;
        }
    }
Exemplo n.º 9
0
    public void OnButtonClick(string ButtonName)
    {
        switch (ButtonName)
        {
        case "Select":
            SoundController.Static.playSoundFromName("Click");
            selectedButton.SetActive(true);
            // save selected player index
            PlayerPrefs.SetInt("SelectedPlayer", PlayerIndex);
            break;

        case "Previous":
            SoundController.Static.playSoundFromName("Click");
            showPreviousPlayer();
            break;

        case "Next":
            SoundController.Static.playSoundFromName("Click");
            showNextPlayer();
            break;

        case "Buy":
            SoundController.Static.playSoundFromName("Click");
            PurchasePlayer();
            MainMenu.currentScreen = MainMenu.MenuScreens.UnSufficentCoinsMenu;
            break;

        case "Back":
            SoundController.Static.playSoundFromName("Click");
            PlayerSelectionWithCamera.SetActive(false);
            PlayerSelectionMenu.SetActive(false);
            MainMenuParent.SetActive(true);
            pc.InstantiateSelectedPlayer();
            MainMenu.currentScreen = MainMenu.MenuScreens.mainmenu;
            break;
        }
    }