Beispiel #1
0
    public readonly SkillEntity skillEntity;    // ddong

    public Command(SkillEntity skillEntity, bool preCooltime, FireCondition condition)
        : this(skillEntity.Motion, skillEntity.ActionPattern, skillEntity.Priority, skillEntity.CooldownTime, skillEntity.GlobalCooldownTime, preCooltime, condition)
    {
        this.skillEntity = skillEntity;
        this.castTime = skillEntity.CastTime;
        this.castMotion = skillEntity.castMotion;
        this.manaConsume = skillEntity.ManaConsume;
    }
Beispiel #2
0
    public Command(CommandEntity commandEntity, FireCondition condition)
    {
        if (Constants.Instance.Editor.VerifyData)
        {
            ActionPattern.Create(actionPattern);
        }

        this.animationName = commandEntity.motion;
        this.priority = commandEntity.queuePriority;
        this.actionPattern = commandEntity.actionPattern;
        this.initCooltime = commandEntity.coolTime;
        this.condition = condition;
    }
Beispiel #3
0
        private static FireCondition ParseFireConditionCombatData(XElement element)
        {
            FireCondition fireCondition = new FireCondition();

            if (element.Attribute("min") is XAttribute minAttribute)
            {
                fireCondition.Min = short.Parse(minAttribute.Value);
            }

            if (element.Attribute("max") is XAttribute maxAttribute)
            {
                fireCondition.Max = short.Parse(maxAttribute.Value);
            }

            return(fireCondition);
        }
Beispiel #4
0
    public Command(string animationName, string actionPattern, int priority, float cooltime, float globalCooltime, bool preCooltime, FireCondition condition)
    {
        if (Constants.Instance.Editor.VerifyData)
        {
            ActionPattern.Create(actionPattern);
        }

        this.animationName = animationName;
        this.priority = priority;
        this.actionPattern = actionPattern;
        this.initCooltime = cooltime;
        this.initGlobalCooltime = globalCooltime;
        this.condition = condition;
        if (preCooltime)
        {
            remainCooltime = initCooltime;
        }
    }
Beispiel #5
0
 public OnDemandCommand(SkillEntity skillEntity, bool preCooltime, FireCondition condition)
     : base(skillEntity, preCooltime, condition)
 {
     pattern = ActionPattern.Create(actionPattern);
 }
Beispiel #6
0
 public OnDemandCommand(string animationName, string actionPattern, int priority, float cooltime, bool preCooltime, FireCondition condition)
     : base(animationName, actionPattern, priority, cooltime, 0, preCooltime, condition)
 {
     pattern = ActionPattern.Create(actionPattern);
 }
Beispiel #7
0
 protected MobCommand(string animationName, string actionPattern, int priority, float cooltime, bool preCooltime, FireCondition condition)
     : base(animationName, actionPattern, priority, cooltime, preCooltime, condition)
 {
 }
Beispiel #8
0
 public MobRangeAttack(float cooltime, int projectileId, FireCondition condition)
     : base("attack", string.Format("Projectile({0}; {1})", projectileId, Attack), Priority, cooltime, false, condition)
 {
 }
Beispiel #9
0
 public SkillCommand(SkillEntity skillEntity, FireCondition condition)
     : base(skillEntity.Motion, ApplyManaConsume(skillEntity.ActionPattern, skillEntity.ManaConsume), skillEntity.Priority, skillEntity.CooldownTime, skillEntity.GlobalCooldownTime, false, condition)
 {
     this.skillEntity = skillEntity;
 }
Beispiel #10
0
 public SkillCommand(UltimateSkillEntity skillEntity, FireCondition condition)
     : base(TableLoader.GetTable<CommandEntity>().Get(skillEntity.commandCode), condition)
 {
     this.skillEntity = skillEntity;
 }