Ejemplo n.º 1
0
 public void OnClickMoney()
 {
     CommonCommand.ExecuteLongMain(Client2ServerList.GetInst().C2S_STORE_BUY_HERO, new ArrayList()
     {
         (byte)HeroId, false
     });
 }
Ejemplo n.º 2
0
        private void OnConfirm()
        {
            string command = commandInput.text;

            if (command.Equals(string.Empty))
            {
                return;
            }

            string[]  param     = command.Split(' ');
            ArrayList paramList = new ArrayList()
            {
                param[0], param[1], param.Length == 3 ? param[2] : string.Empty
            };

            int id = int.Parse(param[0]);

            if ((id >> 1 << 1) == id)
            {
                CommonCommand.ExecuteLongBattle(Client2ServerList.GetInst().C2S_GM, paramList);
            }
            else
            {
                CommonCommand.ExecuteLongMain(Client2ServerList.GetInst().C2S_GM, paramList);
            }
        }
Ejemplo n.º 3
0
 private void OnClickMulti()
 {
     SceneLoader.IsSingle = false;
     CommonCommand.ExecuteLongMain(Client2ServerList.GetInst().C2S_LOGIN_PVP_REQUEST, new ArrayList()
     {
         (byte)2
     });
 }
Ejemplo n.º 4
0
 public void OnClickCoin()
 {
     if (PlayerData.Coin < int.Parse(Coin))
     {
         MsgBoxPanel.ShowMsgBox("Warning", string.Format("Not enough Coins !"), 1);
         return;
     }
     MsgBoxPanel.MsgCallback OnOk = () => { CommonCommand.ExecuteLongMain(Client2ServerList.GetInst().C2S_STORE_BUY_HERO, new ArrayList()
         {
             (byte)HeroId, true
         }); };
     MsgBoxPanel.ShowMsgBox("Buy Hero", string.Format("Spend {0} Coins to buy {1} ?", Coin, Name.text), 2, OnOk);
 }
Ejemplo n.º 5
0
 private void ClosePanel()
 {
     _gameObject.SetActive(false);
     for (int i = 0; i < _lstSceneItems.Count; ++i)
     {
         if (_lstSceneItems[i].Toggle.isOn && i != PlayerData.CurScene)
         {
             CommonCommand.ExecuteLongMain(Client2ServerList.GetInst().C2S_PLAYER_SET_SCENE, new ArrayList()
             {
                 (byte)i
             });
         }
     }
 }
Ejemplo n.º 6
0
 private void CancelSearch()
 {
     CommonCommand.ExecuteLongMain(Client2ServerList.GetInst().C2S_LOGIN_PVP_CANCEL, new ArrayList()
     {
     });
 }