コード例 #1
0
ファイル: Main.cs プロジェクト: husheng0/LockStepSimpleDemo
 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());
     }
 }
コード例 #2
0
 public void SendMsg(MsgID msgId, IMessage msg)
 {
     ClientUdpMgr.GetInstance().SendMsg(msgId, msg);
 }