public void OnClose() { GlobalGame.SendPackage(new C2S100005() { RoomId = 100000 }); }
public void Handle(object sender, Packet packet) { Log.Info("{0},网关连接成功", GameUser.Instance.UserName); GlobalGame.IsGameStart = true; GlobalGame.SendPackage(new C2S100001() { RoomId = GameUser.Instance.RoomId }); }
private void FrameUpdate() { if (GameUser.Instance.CurPlayer.SendCommands.Count != 0) { var content = new C2S100009(); while (GameUser.Instance.CurPlayer.SendCommands.Count != 0) { var command = GameUser.Instance.CurPlayer.SendCommands.Dequeue(); content.Commands.Add(command); } GlobalGame.SendPackage(content); } }
public void OnSendMsg() { var textCom = this.GetComponentInChildren <InputField>(); if (string.IsNullOrEmpty(textCom.text)) { return; } //GameEntry.Entity.ShowEntity<SelfChatEntity>( // GameEntry.Entity.GenerateSerialId(), // "Assets/GameMain/Entities/SelfChatMsg.prefab", // "DefaultEntityGroup", new MsgUserData(GameUser.Instance.UserName, textCom.text)); GlobalGame.SendPackage(new C2S100007() { Content = textCom.text }); textCom.text = ""; }
public void OnExit() { C2S100005 content = new C2S100005(); GlobalGame.SendPackage(content); }