Exemplo n.º 1
0
    void OnDisable()
    {
        Fireworks.SetActive(false);
        Confetti.SetActive(false);
        Stars1.SetActive(false);
        Stars2.SetActive(false);

        SlotFull.SetActive(false);
        AssignedSlot.SetActive(false);
        if (Regeneration.instance != null)
        {
            Regeneration.instance.LifeLoseAnim();
        }
    }
Exemplo n.º 2
0
    public void OnWin()
    {
        Fireworks.SetActive(true);
        Confetti.SetActive(true);

        Stars1.SetActive(true);


        SnakesSpawner.instance.playerSnake.isBot = true;
        Result.text         = "You Win !!";
        PlayerNames[0].text = InGameGUI.instance.PlayerPanel[0].PlayerName.text;
        PlayerNames[1].text = InGameGUI.instance.PlayerPanel[1].PlayerName.text;

        PlayerImage[0].sprite = InGameGUI.instance.PlayerPanel[0].Shape.sprite;
        PlayerImage[0].color  = InGameGUI.instance.PlayerPanel[0].Shape.color;

        PlayerImage[1].sprite = InGameGUI.instance.PlayerPanel[1].Shape.sprite;
        PlayerImage[1].color  = InGameGUI.instance.PlayerPanel[1].Shape.color;

        //GameSparkRequests req = new GameSparkRequests();
        //req.Request("AddGold", "amt", "50", UpdateAccountDetails);


        GiveRewards();
        AccountDetails.instance.Save(totalWins: 1);


        Invoke("ShowRewards", 1f);

        if (PhotonNetwork.inRoom || ObliusGameManager.BotType == 1)
        {
            //RewardWindow.transform.DOMove (
            //GSUpdateMMR.instance.UpdateMMR(25);

            AccountDetails.instance.Save(MMR: 25);

            MMR[0].text = "+25";
            MMR[1].text = "-25";
        }
        else
        {
            MMR[0].text = "0";
            MMR[1].text = "0";
        }
        //print ("Win");
    }