public AProjectile(PrimaryObject source, PrimaryObject target, DamageType dmgType, int damage, int speed, int acceleration)
 {
     this.source       = source;
     this.target       = target;
     this.dmgType      = dmgType;
     this.damage       = damage;
     this.speed        = speed;
     this.acceleration = acceleration;
     position          = source.posCenter;
 }
예제 #2
0
 bool checkTargetConstraints(PrimaryObject target)
 {
     foreach (Constraint constraint in targetConstraints.Concat(source.targetConstraints))
     {
         if (!constraint.isAllowed(source, target))
         {
             return(false);
         }
     }
     return(true);
 }
예제 #3
0
        // List

        public bool applyAndWatch(PrimaryObject holder)
        {
            switch (getBuffOverrideRule())
            {
            case BuffOverrideRule.NO_EFFECT:

                break;

            case BuffOverrideRule.STACK:

                break;

            case BuffOverrideRule.TIME_RESET:

                break;

            case BuffOverrideRule.STACK_TIME_RESET:

                break;
            }
        }
예제 #4
0
 protected abstract void remove(PrimaryObject target);
예제 #5
0
 protected abstract bool apply(PrimaryObject target);
예제 #6
0
 abstract void removeEffects(PrimaryObject holder);
예제 #7
0
 abstract void applyEffects(PrimaryObject holder);
예제 #8
0
        public bool execute(PrimaryObject source, PrimaryObject target)
        {
            EffectWatcher watcher = createEffectWatcher();

            watcher.applyAndWatch(apply, remove, source, target);
        }
예제 #9
0
 public ProjectileSplitGleive(PrimaryObject source, PrimaryObject target, DamageType dmgType, int damage, int speed, int acceleration) : base(source, target, dmgType, damage, speed, acceleration)
 {
 }
예제 #10
0
        public void applyAndWatch(Action <PrimaryObject, PrimaryObject> applyEffectAction, Action <PrimaryObject, PrimaryObject> removeEffectAction, Effect effect, PrimaryObject source, PrimaryObject target)
        {
            this.applyEffectAction  = applyEffectAction;
            this.removeEffectAction = removeEffectAction;


            bool wasApplied = applyEffectAction(source, target);


            Task.Factory.StartNew(() => startWatchingAsync());
        }
예제 #11
0
 public ProjectileGleive(PrimaryObject source, PrimaryObject target, DamageType dmgType, int damage, int speed, int acceleration, int remainingNumberOfTargets) : base(source, target, dmgType, damage, speed, acceleration)
 {
 }