Example #1
0
 private void ReturnPool(UI_Card card)
 {
     Cards.Remove(card);
     RemoveChild(card);
     CardPool.ReturnObject(card);
     card.visible = false;
 }
Example #2
0
        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            m_p0   = (UI_Card)this.GetChildAt(1);
            m_p1   = (UI_Card)this.GetChildAt(2);
            m_p2   = (UI_Card)this.GetChildAt(3);
            m_time = (GProgressBar)this.GetChildAt(5);
            Init();
        }
Example #3
0
        public override void ConstructFromXML(XML xml)
        {
            base.ConstructFromXML(xml);

            m_ChooseHero           = this.GetControllerAt(0);
            m_Request              = this.GetControllerAt(1);
            m_ChangeSeatController = this.GetControllerAt(2);
            m_PlayerInfo0          = (UI_PlayerSimpleInfo)this.GetChildAt(1);
            m_PlayerInfo1          = (UI_PlayerSimpleInfo)this.GetChildAt(2);
            m_PlayerInfo2          = (UI_PlayerSimpleInfo)this.GetChildAt(3);
            m_PlayerInfo3          = (UI_PlayerSimpleInfo)this.GetChildAt(4);
            m_PlayerInfo4          = (UI_PlayerSimpleInfo)this.GetChildAt(5);
            m_PlayerInfo5          = (UI_PlayerSimpleInfo)this.GetChildAt(6);
            m_PlayerInfo6          = (UI_PlayerSimpleInfo)this.GetChildAt(7);
            m_PlayerInfo7          = (UI_PlayerSimpleInfo)this.GetChildAt(8);
            m_EventDeckCount       = (GTextField)this.GetChildAt(13);
            m_ActionDeckCount      = (GTextField)this.GetChildAt(17);
            m_MainSize             = (UI_MainSize)this.GetChildAt(19);
            m_RoundInfo            = (GTextField)this.GetChildAt(20);
            m_TurnInfo             = (GTextField)this.GetChildAt(21);
            m_NowEvent             = (UI_Card)this.GetChildAt(26);
            m_DelayAction          = (GList)this.GetChildAt(27);
            m_ActionDropDeck       = (GTextField)this.GetChildAt(29);
            m_EventDropDeckCount   = (GTextField)this.GetChildAt(32);
            m_PlayerHero           = (UI_Card)this.GetChildAt(34);
            m_GameInfo             = (UI_Log)this.GetChildAt(36);
            m_Hand             = (UI_HandCards)this.GetChildAt(37);
            m_SetEvent         = (UI_Card)this.GetChildAt(38);
            m_NowTheme         = (GComponent)this.GetChildAt(41);
            m_ThemeDeckCount   = (GTextField)this.GetChildAt(46);
            m_ActivePlayer     = (GTextField)this.GetChildAt(48);
            m_TimeBar          = (GProgressBar)this.GetChildAt(50);
            m_NowAction        = (UI_Card)this.GetChildAt(51);
            m_UseTip           = (GTextField)this.GetChildAt(62);
            m_skills           = (GList)this.GetChildAt(63);
            m_useCard          = (GButton)this.GetChildAt(65);
            m_Endturn          = (GButton)this.GetChildAt(66);
            m_freeUse          = (GGroup)this.GetChildAt(67);
            m_choose_y         = (GButton)this.GetChildAt(69);
            m_choose_n         = (GButton)this.GetChildAt(70);
            m_chooseCard       = (GGroup)this.GetChildAt(71);
            m_choiceList       = (GList)this.GetChildAt(73);
            m_takeChoice       = (GGroup)this.GetChildAt(74);
            m_requestList      = (GList)this.GetChildAt(76);
            m_ChooseRequest    = (GGroup)this.GetChildAt(77);
            m_limitUse         = (GButton)this.GetChildAt(78);
            m_limitUseCancel   = (GButton)this.GetChildAt(79);
            m_forward          = (GButton)this.GetChildAt(81);
            m_backward         = (GButton)this.GetChildAt(82);
            m_setcard          = (GButton)this.GetChildAt(83);
            m_chooseDirection  = (GGroup)this.GetChildAt(84);
            m_HeroChooseWindow = (UI_ChooseHero)this.GetChildAt(86);
            m_ChangeSeatPanel  = (UI_ChangeSeat)this.GetChildAt(87);
            Init();
        }
 private void DisplayCard_Init()
 {
     //这里必须先行其他注册事件,否则其他位置的手牌会出错
     //点选卡片
     m_Hand.OnCardClick.Add(evt =>
     {
         UI_Card uI_Card = evt.data as UI_Card;
         ActionCard card = uI_Card.Card as ActionCard;
         if (selectedCards.Contains(card))
         {
             selectedCards.Remove(card);
         }
         else
         {
             selectedCards.Add(card);
         }
         m_Hand.SetCards(self.ActionCards, selectedCards);
     });
 }