Ejemplo n.º 1
0
 void onConnectAccountSucess()
 {
     Cmd.ReqAccountOperation req = new Cmd.ReqAccountOperation();
     req.action   = Cmd.AccountAction.AccountAction_Login;
     req.user     = user_;
     req.password = password_;
     Nets.Send(Cmd.CLIENTID.RQAccountOperation, req);
 }
Ejemplo n.º 2
0
 void onConnectGameSucess()
 {
     Cmd.ReqLoginGameServer req = new Cmd.ReqLoginGameServer();
     req.time      = preOperation_.time;
     req.token     = preOperation_.token;
     req.accountid = preOperation_.accountid;
     Nets.Send(Cmd.CLIENTID.RQLoginGame, req);
 }
Ejemplo n.º 3
0
    void SendMessage()
    {
        if (this.window_.input_.text.Length == 0)
        {
            return;
        }

        Cmd.ReqChat cmd = new Cmd.ReqChat();
        cmd.channel = Cmd.MessageChannel.MessageChannel_User_World;
        cmd.from    = LoginSystem.Instance.currentRole.name;
        cmd.roleID  = LoginSystem.Instance.currentRole.id;
        cmd.content = this.window_.input_.text;
        Nets.Send(Cmd.CLIENTID.RQChat, cmd);
    }
Ejemplo n.º 4
0
 protected override void OnCommand(EventContext context)
 {
     if (context.sender == this.window.enterGame2)
     {
         if (LoginSystem.Instance.HasRole())
         {
             Nets.Send(Cmd.CLIENTID.RQEnterGame);
             this.window.enterGame2.enabled = false;
         }
         else
         {
             var cmd = new Cmd.ReqCreateRole();
             cmd.name = this.window.name1.text;
             cmd.sex  = 0;
             cmd.job  = 1;
             Nets.Send(Cmd.CLIENTID.RQCreateRole, cmd);
         }
     }
 }