/org.jfge.games.sfvsmk2/src/org/jfge/games/sfvsmk2/game/SfVsMk2.java

http://java-fighting-game-engine.googlecode.com/ · Java · 80 lines · 69 code · 8 blank · 3 comment · 0 complexity · 06232bd4e4b4762492e3ece9859f7252 MD5 · raw file

  1. package org.jfge.games.sfvsmk2.game;
  2. import java.util.Map;
  3. import org.jfge.api.ai.AiModule;
  4. import org.jfge.api.arena.ArenaModule;
  5. import org.jfge.api.collision.CollisionModule;
  6. import org.jfge.api.effect.EffectModule;
  7. import org.jfge.api.engine.EngineModule;
  8. import org.jfge.api.fighter.FighterModule;
  9. import org.jfge.api.game.Game;
  10. import org.jfge.api.game.GameModule;
  11. import org.jfge.api.projectile.ProjectileModule;
  12. import org.jfge.api.render.RenderModule;
  13. import org.jfge.ext.physics.PhysicsModule;
  14. import org.jfge.ext.scene.SceneModule;
  15. import org.jfge.games.mk2.arena.MortalKombat2ArenaModule;
  16. import org.jfge.games.mk2.effect.MortalKombat2EffectModule;
  17. import org.jfge.games.mk2.fighter.MortalKombat2FighterModule;
  18. import org.jfge.games.mk2.game.MortalKombat2GameModule;
  19. import org.jfge.games.mk2.projectile.MortalKombat2ProjectileModule;
  20. import org.jfge.games.mk2.render.MortalKombat2RenderModule;
  21. import org.jfge.games.sf2.arena.StreetFighter2ArenaModule;
  22. import org.jfge.games.sf2.collision.StreetFighter2CollisionModule;
  23. import org.jfge.games.sf2.fighter.StreetFighter2FighterModule;
  24. import org.jfge.games.sf2.game.StreetFighter2GameModule;
  25. import org.jfge.games.sf2.projectile.StreetFighter2ProjectileModule;
  26. import org.jfge.games.sf2.renderer.StreetFighter2RenderModule;
  27. import org.jfge.games.sfvsmk2.arena.SfVsMk2ArenaModule;
  28. import org.jfge.games.sfvsmk2.collision.SfVsMk2CollisionModule;
  29. import org.jfge.j2se.graphics.J2SeGraphicsModule;
  30. import com.google.inject.Guice;
  31. import com.google.inject.Injector;
  32. import com.google.inject.Key;
  33. import com.google.inject.TypeLiteral;
  34. public class SfVsMk2 {
  35. public static void main(String[] args) {
  36. Injector injector = Guice.createInjector(
  37. new EngineModule(),
  38. new J2SeGraphicsModule(),
  39. new CollisionModule(),
  40. new EffectModule(),
  41. new PhysicsModule(),
  42. new FighterModule(),
  43. new SceneModule(),
  44. new AiModule(),
  45. new ProjectileModule(),
  46. new ArenaModule(),
  47. new RenderModule(),
  48. new GameModule(),
  49. // street fighter modules
  50. new StreetFighter2FighterModule(),
  51. new StreetFighter2ArenaModule(),
  52. new StreetFighter2RenderModule(),
  53. new StreetFighter2ProjectileModule(),
  54. new StreetFighter2CollisionModule(),
  55. new StreetFighter2GameModule(),
  56. // mortal kombat modules
  57. new MortalKombat2ArenaModule(),
  58. new MortalKombat2FighterModule(),
  59. new MortalKombat2EffectModule(),
  60. new MortalKombat2ProjectileModule(),
  61. new MortalKombat2RenderModule(),
  62. new MortalKombat2GameModule(),
  63. // street fighter vs. mortal kombat 2 modules
  64. new SfVsMk2ArenaModule(),
  65. new SfVsMk2GameModule(),
  66. new SfVsMk2CollisionModule()
  67. );
  68. Map<String, Game> games = injector.getInstance(Key.get(new TypeLiteral<Map<String, Game>>() {}));
  69. Game game = games.get("sfVsMk2");
  70. game.start();
  71. }
  72. }