Пример #1
0
 public void onDamage(Entity e)
 {
     if (onDamageHandler != null)
     {
         EffectHandler temp = onDamageHandler;
         onDamageHandler = null;
         temp.effect(e);
         onDamageHandler = temp;
     }
 }
Пример #2
0
 public void onSpell(Entity e)
 {
     if (onSpellHandler != null)
     {
         EffectHandler temp = onSpellHandler;
         onSpellHandler = null;
         temp.effect(e);
         onSpellHandler = temp;
     }
 }
Пример #3
0
        public EffectHandler onTurnEndHandler;   // when a turn ends


        public void onGained(Entity e)
        {
            if (onGainedHandler != null)
            {
                EffectHandler temp = onBuffedHandler;
                onGainedHandler = null;
                temp.effect(e);
                onGainedHandler = temp;
            }
        }
Пример #4
0
 public void onLeave(Cell c)
 {
     if (onTurnStartHandler != null)
     {
         EffectHandler temp = onTurnStartHandler;
         onTurnStartHandler = null;
         temp.effect(c);
         onTurnStartHandler = temp;
     }
 }
Пример #5
0
 public void onTurnEnd(Cell c)
 {
     if (onTurnEndHandler != null)
     {
         EffectHandler temp = onTurnEndHandler;
         onTurnEndHandler = null;
         temp.effect(c);
         onTurnEndHandler = temp;
     }
 }
Пример #6
0
 public void onTurnEnd(Entity e)
 {
     if (onTurnEndHandler != null)
     {
         EffectHandler temp = onTurnEndHandler;
         onTurnEndHandler = null;
         temp.effect(e);
         onTurnEndHandler = temp;
     }
 }