Beispiel #1
0
        public override SkillAction Copy(Skill skill)
        {
            SelectTargetAction action = new SelectTargetAction();

            action.filter = this.filter;
            action.radius = this.radius;
            action.range  = this.range;
            action.mSkill = skill;
            return(action);
        }
Beispiel #2
0
        private SelectTargetAction LoadSelectTargetAction(XmlElement node)
        {
            var action = new SelectTargetAction();

            action.filter = (TargetFilter)Enum.Parse(typeof(TargetFilter), node.GetAttribute("filter"));
            if (action.filter != TargetFilter.kSelf)
            {
                action.range = (TargetRange)Enum.Parse(typeof(TargetRange), node.GetAttribute("range"));
                if (action.range == TargetRange.kCirclefield)
                {
                    action.radius = float.Parse(node.GetAttribute("radius"));
                }
            }
            return(action);
        }