void OnJoinSucess(GameEngine.Event evt) { GameProtos.common.NewUser newUser = (evt as RoomEvent).newUser; Debug.Log("new user: " + newUser.Name); GameProtos.common.NewUser playerData = (evt as RoomEvent).newUser; if (players.ContainsKey(playerData.Uid)) { return; } Player player = Instantiate(playerPrefab).GetComponent <Player>(); int myID = proxyMgr.GetProxy <AccountProxy>().ID; player.Init(playerData.Uid, playerData.Name, newUser.Uid == myID); players.Add(newUser.Uid, player); }
public void JoinRoom() { Debug.Log("join room"); GameProtos.common.NewUser newUser = new GameProtos.common.NewUser(); SendSockMsg(newUser); }
public RoomEvent(string name, GameProtos.common.NewUser data) : base(name) { newUser = data; }