Ejemplo n.º 1
0
    //for buttons controll
    public void OnButtunClick(string ButtonName)
    {
        Debug.Log(" clicked on " + ButtonName);
        switch (ButtonName)
        {
        //for play button
        case "Play":

            PlayerGroup.SetActive(true);
            SoundController.Static.PlayClickSound();             //for click sound
            MainMenuParent.SetActive(false);
            PlayerSelectionmenuParent.SetActive(true);
            MainMenuScreens.currentScreen = MainMenuScreens.MenuScreens.playerSelectionMenu;            //for state chenge in to mainmenu screen
            break;

        //for more button
        case "More":
            //for open playstore acegames games
                        #if UNITY_IPHONE
            Application.OpenURL("https://play.google.com/store/apps/developer?id=Ace+Games");
                        # elif UNITY_ANDROID
            Application.OpenURL("https://play.google.com/store/apps/developer?id=Ace+Games");
                        #elif UNITY_WP8
            Application.OpenURL("https://play.google.com/store/apps/developer?id=Ace+Games");
                        #endif
            SoundController.Static.PlayClickSound();             //for click sound
            break;
Ejemplo n.º 2
0
 void OpenPlayerSelection()
 {
     MainMenuParent.SetActive(false);
     PlayerSelectionWithCamera.SetActive(true);
     PlayerSelectionmenuParent.SetActive(true);
     TotalCoinsParent.SetActive(true);
     SoundController.Static.playSoundFromName("Click");
     currentScreen = MenuScreens.playerSelectionMenu;
 }
Ejemplo n.º 3
0
 void OpenUpgradesMenu()
 {
     PlayerSelectionmenuParent.SetActive(false);
     UpgradesMenuParent.SetActive(true);
     MainMenuParent.SetActive(false);
     TotalCoinsParent.SetActive(true);
     SoundController.Static.playSoundFromName("Click");
     currentScreen = MenuScreens.StoreMenu;
 }
Ejemplo n.º 4
0
 void DeActive()
 {
     MainMenuParent.SetActive(false);
     LoadingMenuParent.SetActive(false);
     PlayerSelectionmenuParent.SetActive(false);
     PlayerSelectionWithCamera.SetActive(false);
     CreditsMenuParent.SetActive(false);
     ByPopupMenuParent.SetActive(false);
     InSufficentCoinsMenuParent.SetActive(false);
     LevelSelectionMenuParent.SetActive(false);
     UpgradesMenuParent.SetActive(false);
     InnAppMenuParent.SetActive(false);
     InsufficentCoinsForPlayerselectionMenu.SetActive(false);
     MissionsMenuParent.SetActive(false);
 }
Ejemplo n.º 5
0
    void Update()
    {
        if (GameController.Static.currentGameState == GameController.GameState.gameplay)
        {
            return;
        }

        switch (currentScreen)
        {
        case MenuScreens.mainmenu:
            TotalCoinsParent.SetActive(false);

            if (Input.GetKeyDown(KeyCode.Escape))
            {
                //DeActive();
                ExitParent.SetActive(true);
            }
            break;

        case MenuScreens.playerSelectionMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                //FindObjectOfType<PlayerController>().InstantiateSelectedPlayer(); why doesnt this work after purchasing a player??? fuuuck
                MainMenuParent.SetActive(true);
            }
            break;

        case MenuScreens.ControlselectionMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                LevelSelectionMenuParent.SetActive(true);
                currentScreen = MenuScreens.LevelSelectionMenu;
                //TotalCoinsParent.SetActive(true);
            }
            break;

        case MenuScreens.CredtsMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                MainMenuParent.SetActive(true);
            }
            break;

        case MenuScreens.ByPopupMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                PlayerSelectionmenuParent.SetActive(true);
            }
            break;

        case MenuScreens.UnSufficentCoinsMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                MainMenuParent.SetActive(true);
            }
            break;

        case MenuScreens.LevelSelectionMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                PlayerSelectionmenuParent.SetActive(true);
                currentScreen = MenuScreens.playerSelectionMenu;
            }
            break;

        case MenuScreens.StoreMenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                MainMenuParent.SetActive(true);
            }
            break;

        case MenuScreens.InnAppmenu:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                MainMenuParent.SetActive(true);
            }
            break;

        case MenuScreens.Missions:
            if (Input.GetKeyDown(KeyCode.Escape))
            {
                DeActive();
                MainMenuParent.SetActive(true);
            }
            break;
        }
    }
Ejemplo n.º 6
0
    public void OnbuttonClick(System.Object buttonname, EventArgs args)
    {
        SoundController.Static.PlayClickSound();
        Debug.Log(" clicked on " + buttonname.ToString());
        switch (buttonname.ToString())
        {
        //for play button
        case "Play":

            PlayerGroup.SetActive(true);
            //for click sound
            MainMenuParent.SetActive(false);
            PlayerSelectionmenuParent.SetActive(true);
            //MainMenuScreens.currentScreen = MainMenuScreens.MenuScreens.playerSelectionMenu;//for state chenge in to mainmenu screen
            break;
            //for more button
//		case "More":
//			//for open playstore acegames games
//			#if UNITY_IPHONE
//			Application.OpenURL("https://play.google.com/store/apps/developer?id=Ace+Games");
//			# elif UNITY_ANDROID
//			Application.OpenURL ("https://play.google.com/store/apps/developer?id=Ace+Games");
//			#elif UNITY_WP8
//			Application.OpenURL ("https://play.google.com/store/apps/developer?id=Ace+Games");
//			#endif
            SoundController.Static.PlayClickSound();             //for click sound
//			break;
            //for review button
//		case "Review":
//		//for open playstore acegames games
//			#if UNITY_IPHONE
//			Application.OpenURL("https://play.google.com/store/apps/developer?id=Ace+Games");
//			# elif UNITY_ANDROID
//			Application.OpenURL ("https://play.google.com/store/apps/details?id=com.acegames.ninjavszombies2");
//			#elif UNITY_WP8
//			Application.OpenURL ("https://play.google.com/store/apps/developer?id=Ace+Games");
//			#endif
            SoundController.Static.PlayClickSound();             //for click sound
//			break;
            //for credits button
//		case "Credits":
            SoundController.Static.PlayClickSound();             //for click sound

//			MainMenuParent.SetActive (false);
//			//CreditsMenuParent.SetActive (true);
//			//MainMenuScreens.currentScreen = MainMenuScreens.MenuScreens.CredtsMenu;//for state chenge in to credits screen
//			break;
        //for exite button
        case "Exit":
            SoundController.Static.PlayClickSound(); //for click sound
            Application.Quit();                      //for close the game
            break;

        //for store button
        case "Store":
            //StoreMunuParent.SetActive (true);
            MainMenuParent.SetActive(false);
            SoundController.Static.PlayClickSound();             //play click sound
            //MainMenuScreens.currentScreen = MainMenuScreens.MenuScreens.StoreMenu;//for state change in to store screen
            break;
        }
    }