コード例 #1
0
ファイル: EffectBuilder.cs プロジェクト: ggilbert108/ProjectR
 public static Effect buildEffect(EffectDescription description, Location heroLocation)
 {
     switch (description.type)
     {
         case EffectType.Explosion:
             return buildExplosion(description, heroLocation);
     }
     return null;
 }
コード例 #2
0
ファイル: EffectBuilder.cs プロジェクト: ggilbert108/ProjectR
        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
ファイル: Level.cs プロジェクト: ggilbert108/ProjectR
 public void queueEffect(EffectDescription effect)
 {
     _effectQueue.AddFirst(effect);
 }