Esempio n. 1
0
    private void OnSelectBattel(object sender, TypeBattelEnum typeBattel)
    {
        if (user.Decks.Count == 0)
        {
            MessagePanel.SimpleMessage(transform, "no_decks");
            return;
        }

        user.CurrentTypeBattel = typeBattel;

        BaseBattel battel = null;

        switch (typeBattel)
        {
        case TypeBattelEnum.training:
            battel = trainingFactory.Create();
            break;

        case TypeBattelEnum.common:
            break;

        case TypeBattelEnum.rating:
            break;

        default:
            break;
        }
        battel.ReturnBack += Battel_ReturnBack;
        returnButton.SetActive(false);
        Disable();
    }
Esempio n. 2
0
 public void OnConnexionNonAnonymeClick()
 {
     EmailConnexion.SetActive(true);
     ReturnButton.SetActive(true);
     MenuButton.SetActive(false);
     ConnectedButton.SetActive(false);
 }
Esempio n. 3
0
    public void OnClassementClick()
    {
        connexion.GetMaxScoreValue();
        ClassementGUI.SetActive(true);
        ReturnButton.SetActive(true);
        MenuGUI.SetActive(false);
        MenuButton.SetActive(false);
        ConnectedButton.SetActive(false);

        ScoreManagerScript.Score = connexion.getMaxScore["MaxScore"];
    }
Esempio n. 4
0
    void OnSceneLoaded(Scene scene, LoadSceneMode mode)
    {
        isChangingState                 = false;
        blackPanelAlpha.startValue      = 1f;
        blackPanelAlpha.endValue        = 0f;
        blackPanelAlpha.TweenCompleted += SceneFadeinFinishEvent;
        blackPanelAlpha.Begin();
        blackPanelAlpha.value = blackPanelAlpha.startValue;

        if (scene.buildIndex == (int)SCENE_INDEX.GAMESTAGE)
        {
            StageLoader.Instance().SetStage(StageLoader.NextStage);
            gameControlObj.SetActive(true);
            topCanvas.sortingOrder = 10;

            ReturnButton.SetActive(true);
            SettingShowButton.SetActive(true);

            if (StageLoader.CurrentStage == 1)
            {
                PlayerManager.Instance().playerController.isFainting = true;
            }

            GameManager.Instance().Time_LatestStartGame = DateTime.UtcNow;

            // #### TEST
            if (GameManager.Instance().IsTestMode)
            {
                testButton.gameObject.SetActive(true);
            }
            else
            {
                testButton.gameObject.SetActive(false);
            }
        }
        else
        {
            StageLoader.Instance().DisableStage();
            gameControlObj.SetActive(false);
            topCanvas.sortingOrder = 0;

            ReturnButton.SetActive(false);
            SettingShowButton.SetActive(false);

            testButton.gameObject.SetActive(false);
        }

        PlayerManager.Instance().IsTriggerEnding = false;

        StartBGM(scene);
        ChangeEnvironment(scene);
    }
Esempio n. 5
0
 private void FindAndOpenPanel(PanelNameEnum panelName)
 {
     foreach (var item in panels)
     {
         if (item.Name == panelName)
         {
             panelsStack.Push(item);
             returnButton.SetActive(true);
             item.Enable();
             break;
         }
     }
 }
Esempio n. 6
0
    public void InjectMetod(List <IPanelUI> panels, ReturnButton returnButton, CollectionMenu collectionMenu)
    {
        (this.panels, this.returnButton) = (panels, returnButton);

        panels.ForEach(x => Customize(x));

        returnButton.SetListener(ToReturn);
        returnButton.transform.SetParent(transform, false);
        returnButton.transform.SetAsLastSibling();
        returnButton.SetActive(false);

        collectionMenu.SetListener(OpenPanel);
    }
Esempio n. 7
0
    public void OnReturnClick()
    {
        ClassementGUI.SetActive(false);
        SuccesGUI.SetActive(false);
        ReturnButton.SetActive(false);
        EmailConnexion.SetActive(false);
        MenuGUI.SetActive(true);
        MenuButton.SetActive(true);
        ConnectedButton.SetActive(true);

        if (connexion.isconnectedWithAccount)
        {
            Compte.SetActive(false);
        }

        ScoreManagerScript.Score = 0;
        connexion.GetMaxScoreValue();
    }
Esempio n. 8
0
    public void OnSuccesClick()
    {
        connexion.GetMaxScoreValue();
        SuccesGUI.SetActive(true);
        ReturnButton.SetActive(true);
        MenuGUI.SetActive(false);
        MenuButton.SetActive(false);
        ConnectedButton.SetActive(false);

        if (connexion.getMaxScore["MaxScore"] >= 10)
        {
            Succes[0].SetActive(true);
            if (connexion.getMaxScore["MaxScore"] >= 50)
            {
                Succes[1].SetActive(true);
                if (connexion.getMaxScore["MaxScore"] >= 100)
                {
                    Succes[2].SetActive(true);
                }
            }
        }
    }