Exemplo n.º 1
0
        public void ActivateLearnBtn(SkillSlotType inSlotType, bool bActivate, bool bAll)
        {
            NewbieGuideManager.CloseGuideForm();
            if (!bAll && (inSlotType < SkillSlotType.SLOT_SKILL_1 || inSlotType > SkillSlotType.SLOT_SKILL_3))
            {
                return;
            }
            List <GameObject> list = this.QuerySkillButtons(inSlotType, bAll);

            for (int i = 0; i < list.get_Count(); i++)
            {
                GameObject gameObject = list.get_Item(i);
                if (gameObject != null)
                {
                    Transform transform = gameObject.transform.FindChild("LearnBtn");
                    if (!(transform == null))
                    {
                        GameObject gameObject2 = transform.gameObject;
                        Button     component   = gameObject2.GetComponent <Button>();
                        if (component)
                        {
                            component.enabled = bActivate;
                        }
                        CUIEventScript component2 = gameObject2.GetComponent <CUIEventScript>();
                        if (component2)
                        {
                            component2.enabled = bActivate;
                        }
                    }
                }
            }
        }
Exemplo n.º 2
0
 public void ActivateOtherBtn(enRestSkillSlotType inSlotType, bool bActivate, bool bAll)
 {
     NewbieGuideManager.CloseGuideForm();
     if (!bAll && (inSlotType < enRestSkillSlotType.BTN_SKILL_SELHERO || inSlotType > enRestSkillSlotType.BTN_SKILL_COUNT))
     {
         return;
     }
     if (bAll)
     {
         for (int i = 0; i < 3; i++)
         {
             GameObject gameObject = this.QueryRestSkillBtn((enRestSkillSlotType)i);
             if (gameObject != null)
             {
                 Button component = gameObject.GetComponent <Button>();
                 if (component)
                 {
                     component.enabled = bActivate;
                 }
                 CUIEventScript component2 = gameObject.GetComponent <CUIEventScript>();
                 if (component2)
                 {
                     component2.enabled = bActivate;
                 }
             }
         }
     }
     else
     {
         GameObject gameObject2 = this.QueryRestSkillBtn(inSlotType);
         if (gameObject2 != null)
         {
             Button component3 = gameObject2.GetComponent <Button>();
             if (component3)
             {
                 component3.enabled = bActivate;
             }
             CUIEventScript component4 = gameObject2.GetComponent <CUIEventScript>();
             if (component4)
             {
                 component4.enabled = bActivate;
             }
         }
     }
 }
Exemplo n.º 3
0
        public void Activate(SkillSlotType inSlotType, bool bActivate, bool bAll)
        {
            NewbieGuideManager.CloseGuideForm();
            List <GameObject> list = this.QuerySkillButtons(inSlotType, bAll);

            for (int i = 0; i < list.get_Count(); i++)
            {
                GameObject gameObject = list.get_Item(i);
                if (gameObject != null)
                {
                    Button component = gameObject.GetComponent <Button>();
                    if (component)
                    {
                        component.enabled = bActivate;
                    }
                    CUIEventScript component2 = gameObject.GetComponent <CUIEventScript>();
                    if (component2)
                    {
                        component2.enabled = bActivate;
                    }
                }
            }
            if (!bActivate && Singleton <CBattleSystem> .GetInstance().FightForm != null && Singleton <CBattleSystem> .GetInstance().FightForm.m_skillButtonManager != null)
            {
                if (bAll)
                {
                    for (int j = 0; j < 10; j++)
                    {
                        Singleton <CBattleSystem> .GetInstance().FightForm.m_skillButtonManager.SkillButtonUp(Singleton <CBattleSystem> .GetInstance().FightFormScript, (SkillSlotType)j, false, default(Vector2));
                    }
                }
                else
                {
                    Singleton <CBattleSystem> .GetInstance().FightForm.m_skillButtonManager.SkillButtonUp(Singleton <CBattleSystem> .GetInstance().FightFormScript, inSlotType, false, default(Vector2));
                }
            }
        }