Exemplo n.º 1
0
 /// <summary>
 /// 加入房间成功
 /// </summary>
 /// <param name="sCEntranceRoom"></param>
 private async void JoinRoomSuccess(SCEntranceRoom sCEntranceRoom, guessState guessState)
 {
     //获取这个阶段
     PartyGuessTime.Instance.guessState = guessState;
     //切换关卡
     await StaticData.EnterParty(sCEntranceRoom);
 }
Exemplo n.º 2
0
    public async void InitValue(SCEntranceRoom sCEntranceRoom)
    {
        Init();
        _partyPlayerManager.SpawnRoleList(sCEntranceRoom, transform.Find(_mapName));
        //打开晚会主界面
        await OpenUIPartyMain();

        //玩家进入房间的时候获取当前时间戳
        GetTime();

        //初始化晚会是否结束状态
        partyEnd = false;


        SetTaskTime();
    }
Exemplo n.º 3
0
    /// <summary>
    /// 生成玩家列表
    /// </summary>
    public void SpawnRoleList(SCEntranceRoom sCEntranceRoom, Transform mapTra)
    {
        _mapTra = mapTra;

        if (sCEntranceRoom != null && sCEntranceRoom.SCRoomUserInfo != null)
        {
            Debug.Log("生成玩家列表 sCEntranceRoom.SCRoomUserInfo.Count:" + sCEntranceRoom.SCRoomUserInfo.Count);
            for (int i = 0; i < sCEntranceRoom.SCRoomUserInfo.Count; i++)
            {
                SpawnRole(sCEntranceRoom.SCRoomUserInfo[i]);
            }
        }
        //生成玩家自己的角色
        SCRoomUserStruct info = new SCRoomUserStruct();

        info.Uid  = StaticData.Uid;
        info.Name = StaticData.playerInfoData.userInfo.Name;
        //info.CostumeId = ;
        //info.RoomId = ;
        SpawnRole(info);
    }