Beispiel #1
0
 private void InitGame()
 {
     if (!Config.IsServer)
     {
         GameObject go         = Instantiate(Resources.Load <GameObject>("Prefabs/GameUI"));
         GameObject popUpLayer = GameObject.Find("Canvas/PopUpLayer");
         go.GetComponent <RectTransform>().SetParent(popUpLayer.GetComponent <RectTransform>(), false);
         // 发送登录请求
         ClientUdpMgr.GetInstance().SendMsg(MsgID.LoginReq, new LoginReq());
     }
 }
 public void SendMsg(MsgID msgId, IMessage msg)
 {
     ClientUdpMgr.GetInstance().SendMsg(msgId, msg);
 }