Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 bool checkTargetConstraints(PrimaryObject target)
 {
     foreach (Constraint constraint in targetConstraints.Concat(source.targetConstraints))
     {
         if (!constraint.isAllowed(source, target))
         {
             return(false);
         }
     }
     return(true);
 }
Ejemplo n.º 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;
            }
        }
Ejemplo n.º 4
0
 protected abstract void remove(PrimaryObject target);
Ejemplo n.º 5
0
 protected abstract bool apply(PrimaryObject target);
Ejemplo n.º 6
0
 abstract void removeEffects(PrimaryObject holder);
Ejemplo n.º 7
0
 abstract void applyEffects(PrimaryObject holder);
Ejemplo n.º 8
0
        public bool execute(PrimaryObject source, PrimaryObject target)
        {
            EffectWatcher watcher = createEffectWatcher();

            watcher.applyAndWatch(apply, remove, source, target);
        }
Ejemplo n.º 9
0
 public ProjectileSplitGleive(PrimaryObject source, PrimaryObject target, DamageType dmgType, int damage, int speed, int acceleration) : base(source, target, dmgType, damage, speed, acceleration)
 {
 }
Ejemplo n.º 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());
        }
Ejemplo n.º 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)
 {
 }