Beispiel #1
0
 private void SetBtnStateByBtnInfo(int iBtnIndex, bool bIsShow)
 {
     if (iBtnIndex >= 0 && iBtnIndex < this.m_iCurEnemyPlayerCount && this.m_arrBtnInfo[iBtnIndex].btnTransform != null)
     {
         this.m_arrBtnInfo[iBtnIndex].btnTransform.gameObject.CustomSetActive(bIsShow);
         if (this.m_arrBtnInfo[iBtnIndex].objUI3DHp)
         {
             this.m_arrBtnInfo[iBtnIndex].objUI3DHp.gameObject.CustomSetActive(bIsShow);
         }
         if (bIsShow)
         {
             this.SetBtnHpFillAmount(iBtnIndex);
             CUICommonSystem.PlayAnimation(this.m_arrBtnInfo[iBtnIndex].btnTransform, enSkillButtonAnimationName.CD_End.ToString());
         }
         else if (this.m_iCurDrawLinkerBtnIndex == iBtnIndex)
         {
             this.HandleOnEnemyHeroAtkBtnUp();
             this.m_iCurTargetEnemyBtnIndex  = -1;
             this.m_iLastTargetEnemyBtnIndex = -1;
             if (this.m_attackLinker)
             {
                 this.m_attackLinker.gameObject.CustomSetActive(false);
             }
             if (this.m_objSelectedImg)
             {
                 this.m_objSelectedImg.gameObject.CustomSetActive(false);
             }
         }
     }
 }
        private void SimplifySurrenderForm()
        {
            CUIFormScript form = Singleton <CUIManager> .GetInstance().GetForm(CSurrenderSystem.s_surrenderForm);

            if (form)
            {
                Transform transform = form.transform.FindChild("PanelSurrender");
                if (transform)
                {
                    CUICommonSystem.PlayAnimation(transform, null);
                }
            }
        }
Beispiel #3
0
        private void SetBtnStateByBtnInfo(int iBtnIndex)
        {
            if (iBtnIndex >= 0 && iBtnIndex < this.m_iCurEnemyPlayerCount && this.m_arrBtnInfo != null && this.m_arrBtnInfo[iBtnIndex].btnTransform != null)
            {
                if (this.m_arrBtnInfo[iBtnIndex].heroState != 0)
                {
                    if (this.m_arrBtnInfo[iBtnIndex].btnTransform.gameObject.activeSelf)
                    {
                        this.m_arrBtnInfo[iBtnIndex].btnTransform.gameObject.CustomSetActive(false);
                        if (this.m_arrBtnInfo[iBtnIndex].objUI3DHp)
                        {
                            this.m_arrBtnInfo[iBtnIndex].objUI3DHp.gameObject.CustomSetActive(false);
                        }
                        this.SetEnemyHeroBtnHighlight(iBtnIndex, false);
                        if (iBtnIndex == this.m_iCurTargetEnemyBtnIndex)
                        {
                            this.HandleOnEnemyHeroAtkBtnUp();
                            this.m_iCurTargetEnemyBtnIndex = -1;
                        }
                        else if (this.m_hostActor && this.m_hostActor.handle.ActorAgent != null && this.m_hostActor.handle.ActorAgent.m_wrapper.myBehavior == ObjBehaviMode.Normal_Attack && this.m_hostActor.handle.ActorAgent.m_wrapper.myTarget && this.m_arrBtnInfo[iBtnIndex].actorPtr && this.m_hostActor.handle.ActorAgent.m_wrapper.myTarget.handle.ObjID == this.m_arrBtnInfo[iBtnIndex].actorPtr.handle.ObjID && Singleton <CBattleSystem> .GetInstance().FightForm != null)
                        {
                            CSkillButtonManager skillButtonManager = Singleton <CBattleSystem> .GetInstance().FightForm.m_skillButtonManager;

                            if (skillButtonManager != null)
                            {
                                skillButtonManager.SendUseCommonAttack(1, 0u);
                                skillButtonManager.SendUseCommonAttack(0, 0u);
                            }
                        }
                    }
                }
                else if (!this.m_arrBtnInfo[iBtnIndex].btnTransform.gameObject.activeSelf && Singleton <CBattleSystem> .instance.TheMinimapSys != null && Singleton <CBattleSystem> .instance.TheMinimapSys.CurMapType() != MinimapSys.EMapType.Big && Singleton <CBattleSystem> .instance.TheMinimapSys.CurMapType() != MinimapSys.EMapType.Skill)
                {
                    this.SetBtnHpFillAmount(iBtnIndex);
                    this.SetEnemyHeroBtnAlpha(iBtnIndex, 0.6f);
                    this.m_arrBtnInfo[iBtnIndex].btnTransform.gameObject.CustomSetActive(true);
                    if (this.m_arrBtnInfo[iBtnIndex].objUI3DHp)
                    {
                        this.m_arrBtnInfo[iBtnIndex].objUI3DHp.gameObject.CustomSetActive(true);
                    }
                    CUICommonSystem.PlayAnimation(this.m_arrBtnInfo[iBtnIndex].btnTransform, enSkillButtonAnimationName.CD_End.ToString());
                }
            }
        }
Beispiel #4
0
        public void Show(SkillSlotType inSlotType, bool bShow, bool bAll, bool bPlayShowAnim = false)
        {
            List <GameObject> list = this.QuerySkillButtons(inSlotType, bAll);

            for (int i = 0; i < list.Count; i++)
            {
                GameObject obj2 = list[i];
                if (obj2 != null)
                {
                    obj2.CustomSetActive(bShow);
                    if ((bShow && bPlayShowAnim) && (inSlotType != SkillSlotType.SLOT_SKILL_0))
                    {
                        Transform trans = obj2.transform.FindChild("Present");
                        if (trans != null)
                        {
                            CUICommonSystem.PlayAnimation(trans, enSkillButtonAnimationName.normal.ToString());
                        }
                    }
                }
            }
            if ((!bShow && (Singleton <CBattleSystem> .GetInstance().FightForm != null)) && (Singleton <CBattleSystem> .GetInstance().FightForm.m_skillButtonManager != null))
            {
                if (bAll)
                {
                    for (int j = 0; j < 8; j++)
                    {
                        Vector2 screenPosition = new Vector2();
                        Singleton <CBattleSystem> .GetInstance().FightForm.m_skillButtonManager.SkillButtonUp(Singleton <CBattleSystem> .GetInstance().FightFormScript, (SkillSlotType)j, false, screenPosition);
                    }
                }
                else
                {
                    Singleton <CBattleSystem> .GetInstance().FightForm.m_skillButtonManager.SkillButtonUp(Singleton <CBattleSystem> .GetInstance().FightFormScript, inSlotType, false, new Vector2());
                }
            }
            if (inSlotType < SkillSlotType.SLOT_SKILL_COUNT)
            {
                this.m_buttonHidden[(int)inSlotType] = !bShow;
            }
        }
Beispiel #5
0
        public void Show(SkillSlotType inSlotType, bool bShow, bool bAll, bool bPlayShowAnim = false)
        {
            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)
                {
                    gameObject.CustomSetActive(bShow);
                    if (bShow && bPlayShowAnim && inSlotType != SkillSlotType.SLOT_SKILL_0)
                    {
                        Transform transform = gameObject.transform.FindChild("Present");
                        if (transform)
                        {
                            CUICommonSystem.PlayAnimation(transform, enSkillButtonAnimationName.normal.ToString());
                        }
                    }
                }
            }
            if (!bShow && 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));
                }
            }
            if (inSlotType < SkillSlotType.SLOT_SKILL_COUNT)
            {
                this.m_buttonHidden[(int)inSlotType] = !bShow;
            }
        }