Пример #1
0
        public void ShowHelp(SkillOperateData skillData)
        {
            if (skillData.relation == RelationType.Own)
            {
                skillData.heroData.legionData.CancelSkillOperator(skillData);
//				skillData.operateState = SkillOperateState.Selected;

                OperateAction action = null;

                switch (skillData.skillConfig.operate)
                {
                case SkillOperateType.SelectUnit:
                    action = new SelectUnitAction();
                    break;

                case SkillOperateType.SelectCircle:
//					action = new SelectCircleAction();
                    break;

                case SkillOperateType.SelectDirection:
                    action = new SelectDirectionAction();
                    break;
                }


                if (action != null)
                {
                    action.skillUse  = this;
                    action.skillData = skillData;
                    action.Enter();
                }
            }
        }
Пример #2
0
        public void UseSkill(SkillOperateData skillData)
        {
            if (skillData.relation == RelationType.Own)
            {
                skillData.heroData.legionData.CancelSkillOperator(skillData);

                OperateAction action = null;

                switch (skillData.skillConfig.operate)
                {
                case SkillOperateType.Immediately:
                    skillData.OnUse();
                    break;

                case SkillOperateType.Passive:
                    skillData.OnUse();
                    break;

                case SkillOperateType.SelectUnit:
                    action = new SelectUnitAction();
                    break;

                case SkillOperateType.SelectCircle:
                    action = new SelectCircleAction();
                    break;

                case SkillOperateType.SelectDirection:
                    action = new SelectDirectionAction();
                    break;
                }


                if (action != null)
                {
                    action.skillUse  = this;
                    action.skillData = skillData;
                    action.Enter();
                }
            }
        }