Exemple #1
0
    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);
    }
Exemple #2
0
 public void JoinRoom()
 {
     Debug.Log("join room");
     GameProtos.common.NewUser newUser = new GameProtos.common.NewUser();
     SendSockMsg(newUser);
 }
Exemple #3
0
 public RoomEvent(string name, GameProtos.common.NewUser data) : base(name)
 {
     newUser = data;
 }