Exemplo n.º 1
0
    /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    public void BackButtonPressed()
    {
        //MENU
        if (Application.loadedLevelName == "03 Menu")
        {
            settingsPopUp.HidePopUp();
            quitPopUp.ShowPopUp();
        }
        //WORLDS
        else if (Application.loadedLevelName == "04 World Menu")
        {
            //GameAnalytics.NewProgressionEvent (GA_Progression.GAProgressionStatus.GAProgressionStatusFail, LevelManager.levelNo.ToString());
            Application.LoadLevel("03 Menu");             //Go to Menu Scene
        }
        //GAME-WORLDS
        else if (Application.loadedLevelName == "05 Game Scene")
        {
            settingsPopUp.HidePopUp();
            livesPopUp.ShowPopUp();
        }
        //GAME-ARCADE
        else if (Application.loadedLevelName == "06 Arcade Game Scene")
        {
            settingsPopUp.HidePopUp();
            quitArcadePopUp.ShowPopUp();
        }
    }
Exemplo n.º 2
0
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    /*
     * void Update()
     * {
     *      //Nos esperamos un frame antes de mostrar el popup ya que PopUpMgr se espera un frame para evitar problemas con el Update del InputScript
     *      if(bShowCoinsPopUp){
     *              ShopCoinsPopUp.ShowPopUp();
     *              bShowCoinsPopUp=false;
     *      }
     * }
     */
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    public void PurchaseBall()
    {
        int price = int.Parse(textPrice.text);

        //Comprar un booster y restar dinero disponible
        if (PlayerPrefs.GetInt("Coins") >= price)
        {
            int quantity = PlayerPrefs.GetInt(BallString) + numBalls;
            int coins    = PlayerPrefs.GetInt("Coins") - price;

            PlayerPrefs.SetInt(BallString, quantity);
            CoinsManager.instance.SetCoins(coins);

            NumberBallText.text = PlayerPrefs.GetInt(BallString).ToString();

            if (OnSpecialBallBuyed != null)
            {
                OnSpecialBallBuyed();
            }
        }        //Si no hay suficiente dinero, abrir el popup para comprar monedas
        else
        {
            ShopBoostersPopUp.HidePopUp();
            //bShowCoinsPopUp=true;
            ShopCoinsPopUp.ShowPopUp();
        }
    }
Exemplo n.º 3
0
    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    public void purchaseLives()
    {
        if (LivesManager.lives < 5 && PlayerPrefs.GetInt("Coins") >= 100)
        {
            LivesManager.lives = 5;
            CoinsManager.instance.SetCoins(PlayerPrefs.GetInt("Coins") - 100);
            coinstext.text = PlayerPrefs.GetInt("Coins").ToString();
            LivesPopUp.HidePopUp();
            //ParseManager.instance.SaveCurrentData();
            //Adjust.trackEvent(new AdjustEvent("ydzqno"));
        }
        else if (LivesManager.lives < 5 && PlayerPrefs.GetInt("Coins") < 100)
        {
            LivesPopUp.HidePopUp();
            ShopCoinsPopUp.ShowPopUp();
        }
    }
Exemplo n.º 4
0
    //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

    public void ButtonPlayPressed()
    {
        tutorialPopUp.HidePopUp();
    }
Exemplo n.º 5
0
 public void loadlevel()
 {
     popUpMgr.HidePopUp();
     Application.LoadLevel("05 Game Scene");
 }
Exemplo n.º 6
0
 public void closeMoreBubblesPop()
 {
     moreBubblesPop.HidePopUp();
     LevelManager.gameState = GameState.Start;
     LevelManager.instance.GameIsOver();
 }