예제 #1
0
    void RPC_S2C_StartLogin(uLink.BitStream stream, uLink.NetworkMessageInfo info)
    {
        _pos = transform.position = stream.Read <Vector3>();
        int  recordTeamId = stream.Read <int>();
        bool hasRecord    = stream.Read <bool>();

        _networkState = stream.Read <ENetworkState>();

        if (null != RoomGui_N.Instance && RoomGui_N.Instance.isShow)
        {
            RoomGui_N.ChangePlayerStateByNet(Id, (int)NetworkState);
        }

        _useNewPos = UseNewPosition(hasRecord, recordTeamId);

        ChunkManager.Clear();

        if (null != PeSceneCtrl.Instance)
        {
            PeSceneCtrl.Instance.GotoGameSence();
        }

        if (Pathea.PeGameMgr.IsCustom)
        {
            int descId = -1 == DescId ? Id : DescId;
            curPlayerDesc = ForceSetting.AddPlayer(descId, TeamId, EPlayerType.Human, RoleName);
        }
    }
예제 #2
0
    void RPC_S2C_RoomStatusChanged(uLink.BitStream stream, uLink.NetworkMessageInfo info)
    {
        _networkState = stream.Read <ENetworkState>();

        if (null != RoomGui_N.Instance && RoomGui_N.Instance.isShow)
        {
            RoomGui_N.ChangePlayerStateByNet(Id, (int)NetworkState);
        }

        if (IsOwner)
        {
            delGrassPos.Clear();
            delTreePos.Clear();
        }
    }