Пример #1
0
        /// <summary>
        /// constructor with skill asset as input
        /// </summary>
        public Skill(SkillAsset skillAsset)
        {
            Owner           = null;
            Name            = skillAsset.Name;
            Cooldown        = skillAsset.Cooldown;
            Interruptable   = skillAsset.Interruptable;
            CastTime        = skillAsset.CastTime;
            Range           = skillAsset.Range;
            Delay           = skillAsset.Delay;
            CurrentCooldown = Cooldown;
            RequiredLevel   = skillAsset.RequiredLevel;

            foreach (var prerequisite in skillAsset.Prerequisites)
            {
                this.Prerequisites.Add(prerequisite.CreateInstance());
            }

            foreach (var effect in skillAsset.Effects)
            {
                this.Effects.Add(effect.CreateInstance());
                this.Effects [this.Effects.Count - 1].Source = this;
            }
            Effects.Sort((e1, e2) => e1.Delay.CompareTo(e2.Delay));
        }
Пример #2
0
 /// <summary>
 /// constructor with skill asset as input
 /// </summary>
 public PositionSkill(SkillAsset skillAsset) : base(skillAsset)
 {
 }