Exemplo n.º 1
0
    IEnumerator CreateRolePhysics(PlayerBase player, RoleCreate roleCreate)
    {
        if (player != null)
        {
            IEnumerator itor = player.CreatePhysics(false, PhysicsType.Player);
            while (itor.MoveNext())
            {
                yield return(null);
            }

            player.CreateUIRoleCamera(roleCreate.m_ShowRectTL.position, roleCreate.m_ShowRectBR.position, m_ShowCamera, roleCreate.m_Layer);


            player.CurrentStyle = PlayerStyleType.Create;
        }
    }
Exemplo n.º 2
0
        public static IEnumerator CreateAllRoomPlayer()
        {
            List <IEnumerator> createlist = new List <IEnumerator>();

            int listCount = mDancerList.Count;

            for (int i = 0; i < listCount; ++i)
            {
                RoomPlayerData dancerData = mDancerList[i];
                if (dancerData != null && dancerData.mRoomPlayer != null)
                {
                    int dancerPos = dancerData.mRoomPlayer.RolePos;
                    if (dancerData.mRoomPlayer != mMeInfo)
                    {
                        PlayerBase dancerPlayer = mRoomPlayer[dancerPos];
                        if (dancerPlayer != null)
                        {
                            PhysicsType pType = PhysicsType.Player;

                            IEnumerator itor = dancerPlayer.CreatePhysics(true, pType);
                            createlist.Add(itor);
                        }
                    }
                }
            }

            while (createlist.Count != 0)
            {
                yield return(null);

                for (int i = 0; i < createlist.Count; ++i)
                {
                    if (!createlist[i].MoveNext())
                    {
                        createlist.RemoveAt(i);
                    }
                }
            }
        }