Exemple #1
0
    protected override void Start()
    {
        base.Start();
        LM = GameObject.FindGameObjectWithTag("Manager").GetComponent <LobbyManager>();
        switch (BET)
        {
        case ButtonEventType.TRAININGSCENEMOVE:
            AddButtonClickEvent(() => LobbyLoadScene("Training"));
            AddButtonClickEvent(SavePref);
            break;

        case ButtonEventType.SETTINGSCENEMOVE:
            AddButtonClickEvent(() => LobbyLoadScene("Setting"));
            AddButtonClickEvent(SavePref);
            break;

        case ButtonEventType.PLAY:
            AddButtonClickEvent(() => LM.StartMatching());
            AddButtonClickEvent(SavePref);
            break;

        case ButtonEventType.CANCLE:
            AddButtonClickEvent(() => LM.CancleMatching());
            AddButtonClickEvent(SavePref);
            break;
        }
    }