Exemplo n.º 1
0
        public void RequestUseSkill(eSkillSlotType slotType)
        {
            InputModel.instance.SendStopMove(null, false);
            if (slotType == eSkillSlotType.SLOT_SKILL_0)
            {
                CSkillButtonManager skillButtonManager = CBattleSystem.instance.GetSkillButtonManager();
                skillButtonManager.SendUseCommonAttack(0, 0u);
                skillButtonManager.SendUseCommonAttack(1, 0u);
            }
            else if (slotType == eSkillSlotType.SLOT_SKILL_4)
            {
                CSkillButtonManager skillButtonManager = CBattleSystem.instance.GetSkillButtonManager();
                skillButtonManager.RequestUseSkillSlot(slotType, 1);
            }
            else
            {
                SkillSlot slot = m_wrapper.actor.pSkillCtrl.GetSkillSlot(slotType);
                if (slot.SkillObj.AppointType == SkillRangeAppointType.Pos)
                {
                    slot.skillIndicator.SetRobotSkillUsePosition();
                }
                m_wrapper.actor.pSkillCtrl.RequestUseSkillSlot(slotType);
            }

            //             RealUseSkill(slotType);
        }
Exemplo n.º 2
0
        private void OnEnemyHeroAtkBtnDown(CUIEvent uiEvent)
        {
            if (uiEvent.m_srcWidget != null)
            {
                int num = int.Parse(uiEvent.m_srcWidget.name.Substring(uiEvent.m_srcWidget.name.IndexOf("_") + 1));
                if (num >= 0 && num < this.m_iCurEnemyPlayerCount)
                {
                    if (this.m_arrBtnInfo[num].actorPtr)
                    {
                        this.m_iCurTargetEnemyBtnIndex = num;
                        uint objID = this.m_arrBtnInfo[num].actorPtr.handle.ObjID;
                        if (Singleton <CBattleSystem> .GetInstance().FightForm != null)
                        {
                            CSkillButtonManager skillButtonManager = Singleton <CBattleSystem> .GetInstance().FightForm.m_skillButtonManager;

                            if (skillButtonManager != null)
                            {
                                skillButtonManager.SendUseCommonAttack(1, objID);
                            }
                        }
                    }
                    if (this.m_iLastTargetEnemyBtnIndex >= 0 && this.m_iLastTargetEnemyBtnIndex < this.m_iCurEnemyPlayerCount)
                    {
                        this.SetEnemyHeroBtnHighlight(this.m_iLastTargetEnemyBtnIndex, false);
                    }
                    this.SetEnemyHeroBtnHighlight(this.m_iCurTargetEnemyBtnIndex, true);
                    this.SetEnemyHeroBtnSize(this.m_iCurTargetEnemyBtnIndex, true);
                }
            }
        }
Exemplo n.º 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());
                }
            }
        }
Exemplo n.º 4
0
        private void HandleOnEnemyHeroAtkBtnUp()
        {
            if (Singleton <CBattleSystem> .GetInstance().FightForm != null)
            {
                CSkillButtonManager skillButtonManager = Singleton <CBattleSystem> .GetInstance().FightForm.m_skillButtonManager;

                if (skillButtonManager != null)
                {
                    skillButtonManager.SendUseCommonAttack(0, 0u);
                }
                this.SetEnemyHeroBtnSize(this.m_iCurTargetEnemyBtnIndex, false);
                this.m_iLastTargetEnemyBtnIndex = this.m_iCurTargetEnemyBtnIndex;
                this.m_iCurTargetEnemyBtnIndex  = -1;
            }
        }