Exemplo n.º 1
0
        /// <summary>
        /// 先讲自己克隆出来
        /// </summary>
        public void AddLocalGamer(GamerInfo info)
        {
            if (info.UserID != ETModel.Game.Scene.GetComponent <ClientComponent>().User.UserID)
            {
                return;
            }
            Gamer gamer = GamerComponent.AddGamerUI(info);

            if (gamer != null)
            {
                gamer.AddComponent <UICowCow_GamerInfoComponent, GameObject, GamerInfo, int>(UIRoomGamer, info, 0);
                gamer.AddComponent <UICowCow_SSGamerResultComponent, GameObject>(SmallSettlement.SmallBG);
                gamer.AddComponent <UICowCow_BSGamerResultComponent, GameObject>(BigSettlement.BigBG);
            }
            if (GamerComponent.LocalGamer == null)
            {
                GamerComponent.Init(info.UserID);
                if (GamerComponent.LocalGamer.GetComponent <UICowCow_GamerInfoComponent>().Status == UIGamerStatus.Down)
                {
                    ShowHideReadyButton(true);
                }
            }
        }