Пример #1
0
 public static Effect buildEffect(EffectDescription description, Location heroLocation)
 {
     switch (description.type)
     {
         case EffectType.Explosion:
             return buildExplosion(description, heroLocation);
     }
     return null;
 }
Пример #2
0
        private static Explosion buildExplosion(EffectDescription description, Location heroLocation)
        {
            Location location = description.startLocation;
            location.x -= heroLocation.x;
            location.y -= heroLocation.y;

            location.x *= LevelView.TILE_SIZE;
            location.y *= LevelView.TILE_SIZE;

            Explosion explosion = new Explosion(location);
            return explosion;
        }
Пример #3
0
 public void queueEffect(EffectDescription effect)
 {
     _effectQueue.AddFirst(effect);
 }