public static BaseCreature create(ActorType actorType, Point2 position) { BaseEnemy result; if (actorType.is(Sps.Actors.Player)) { result = new Player(activePlayers++); } else { result = generateCreature(actorType); } result.setup(position); EntityManager.get().addEntity(result); if (AigilasConfig.get().debugInventory) { for (int ii = 0; ii < 1000; ii++) { result.pickupItem(ItemFactory.createRandomPlain()); } } return result; }
private static BaseEnemy generateCreature(ActorType actorType) { if (actorType.is(Aigilas.Actors.Wrath)) { return new Wrath(); } if (actorType.is(Aigilas.Actors.Hand)) { return new Hand(); } if (actorType.is(Aigilas.Actors.Pride)) { return new Pride(); } if (actorType.is(Aigilas.Actors.Envy)) { return new Envy(); } if (actorType.is(Aigilas.Actors.Gluttony)) { return new Gluttony(); } if (actorType.is(Aigilas.Actors.Lust)) { return new Lust(); } if (actorType.is(Aigilas.Actors.Sloth)) { return new Sloth(); } if (actorType.is(Aigilas.Actors.Greed)) { return new Greed(); } if (actorType.is(Aigilas.Actors.Serpent)) { return new Serpent(); } if (actorType.is(Aigilas.Actors.Breaking_Wheel)) { return new BreakingWheel(); } if (actorType.is(Aigilas.Actors.Wrath_Acolyte)) { return new WrathEnemyAcolyte(); } if (actorType.is(Aigilas.Actors.Pride_Acolyte)) { return new PrideEnemyAcolyte(); } if (actorType.is(Aigilas.Actors.Envy_Acolyte)) { return new EnvyEnemyAcolyte(); } if (actorType.is(Aigilas.Actors.Gluttony_Acolyte)) { return new GluttonyEnemyAcolyte(); } if (actorType.is(Aigilas.Actors.Lust_Acolyte)) { return new LustEnemyAcolyte(); } if (actorType.is(Aigilas.Actors.Sloth_Acolyte)) { return new SlothEnemyAcolyte(); } if (actorType.is(Aigilas.Actors.Greed_Acolyte)) { return new GreedEnemyAcolyte(); } if (actorType.is(Aigilas.Actors.Dummy)) { return new Dummy(); } Logger.error("Unknown actorType passed into CreatureFactory: " + actorType.Name); return null; }