Beispiel #1
0
        private static void SerializeRoomPlayer(List <RoomPlayerInfo> dancerList)
        {
            for (int i = 0; i < dancerList.Count; ++i)
            {
                RoomPlayerInfo playerInfo = dancerList[i];
                RoomPlayer     dancerInfo = new RoomPlayer();
                dancerInfo.Serialize(playerInfo);

                if (CommonLogicData.MainPlayerID > 0 && CommonLogicData.IsMainPlayer(dancerInfo.RoleID))
                {
                    mMeInfo = dancerInfo;
                }

                int tempIndex = dancerInfo.RolePos;
                if (tempIndex < CommonDef.MAX_ROOM_PLAYER && tempIndex >= 0 && tempIndex < mRoomPlayer.Length)
                {
                    AddDancer(dancerInfo.RoleID, dancerInfo);
                    if (dancerInfo == mMeInfo)
                    {
                        mRoomPlayer[tempIndex] = CommonLogicData.MainPlayer;
                    }
                    else
                    {
                        mRoomPlayer[tempIndex] = PlayerManager.CreateLogic(dancerInfo.GetBriefAttr(), true, playerInfo.m_ItemPacket, playerInfo.m_GenePacket);
                    }
                    mRoomPlayer[tempIndex].PlayerMoveType = (PlayerMoveType)playerInfo.m_nMoveType;
                }
            }
        }
Beispiel #2
0
    protected override void InitAnimation()
    {
        if (AnimationLoader.RoomAniExist && OwnerAni != null)
        {
            // set animName
            List <string> animationNames = null;
            string[]      standVIPs      = new string[3];
            string[]      standRooms     = new string[3];
            if (true)//OwnerPlayer.RoleAttr.IsBoy)
            {
                standVIPs[0]  = AnimationLoader.VIP_STAND_BOY_01;
                standVIPs[1]  = AnimationLoader.VIP_STAND_BOY_02;
                standVIPs[2]  = AnimationLoader.VIP_STAND_BOY_03;
                standRooms[0] = AnimationLoader.StandRoomBoy_B;
                standRooms[1] = AnimationLoader.StandRoomBoy_C;
                standRooms[2] = AnimationLoader.StandRoomBoy_D;
            }


            OwnerAni.AddClip(GetAniClipBySex(Hello), Hello, WrapMode.Once, 3);
            if (true)//IsNeedTransIdleAni)
            {
                animationNames = new List <string>()
                {
                    standRooms[0], standRooms[1], standRooms[2]
                };
                AddStandAni(animationNames);
            }


            if (!CommonLogicData.IsMainPlayer(OwnerPlayer.RoleAttr.RoleID))
            {
                OwnerAni.CrossFadeQueued(Hello);
            }
        }
    }