public JoyLdsOtherPlayer ShowOtherPlayer(User user, int seatServerIndex)
        {
            JoyLdsOtherPlayer player = JoyLdsPlayerFactory.CreateOtherPlayer(user, seatServerIndex);

            player.RestoreUI();
            return(player);
        }
        public JoyLdsUserPlayer ShowUserPlayerInfo(int seatServerIndex = 0)
        {
            JoyLdsUserPlayer userPlayer = JoyLdsPlayerFactory.CreateUserPlayer(Game.Scene.GetComponent <UserComponent>().pSelfUser, mPlayerLocationSelfGo.GetComponent <ReferenceCollector>(), seatServerIndex);

            userPlayer.RestoreUI();
            return(userPlayer);
        }
Example #3
0
        public static async Task <JoyLdsRoom> Create(M2S_StartGame m2SStartGame)
        {
            JoyLdsRoom joyLdsRoom = ComponentFactory.Create <JoyLdsRoom>();

            joyLdsRoom.BesansLowest = m2SStartGame.RoomConfig.BesansLowest;
            joyLdsRoom.BaseMultiple = m2SStartGame.RoomConfig.BaseScore;
            foreach (var matchPlayer in m2SStartGame.MatchPlayerInfos)
            {
                JoyLdsPlayer joyLdsPlayer = await JoyLdsPlayerFactory.Create(matchPlayer, joyLdsRoom);

                joyLdsRoom.pJoyLdsPlayerDic.Add(joyLdsPlayer.pSeatIndex, joyLdsPlayer);
            }
            return(joyLdsRoom);
        }