Skip to content

Commit

Permalink
Rolled back some stuff because I merged poorly
Browse files Browse the repository at this point in the history
  • Loading branch information
max9753 committed Oct 16, 2023
1 parent 60f051d commit 289adff
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ public void spawnAdditionalMob(float positionX, float positionY,

ServiceLocator.getEntityService().register(entityType);

ServiceLocator.getWaveService().setEnemyCount(ServiceLocator.getWaveService().getEnemyCount() + 1);
// ServiceLocator.getWaveService().setEnemyCount(ServiceLocator.getWaveService().getEnemyCount() + 1);
//ServiceLocator.getWaveService().setEnemyCount(ServiceLocator.getWaveService().getEnemyCount() + 1);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,31 @@ public static Entity createGhost() {
return ghost;
}

/**
* Creates a ghost king entity.
*
* @return entity
*/
public static Entity createGhostKing() {
Entity ghostKing = createMeleeBaseNPC();
GhostKingConfig config = configs.ghostKing;

AnimationRenderComponent animator =
new AnimationRenderComponent(
ServiceLocator.getResourceService()
.getAsset("images/ghostKing.atlas", TextureAtlas.class));
animator.addAnimation("float", 0.2f, Animation.PlayMode.LOOP);
animator.addAnimation("angry_float", 0.2f, Animation.PlayMode.LOOP);

ghostKing
.addComponent(new CombatStatsComponent(config.health, config.baseAttack))
.addComponent(animator)
.addComponent(new GhostAnimationController());

ghostKing.getComponent(AnimationRenderComponent.class).scaleEntity();
return ghostKing;
}

/**
* Creates a fire worm entity.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ public class WaveFactory {
)), new ArrayList<>(Arrays.asList("FireWorm", "SplittingRocky", "Necromancer"
)), new ArrayList<>(Arrays.asList("SplittingRocky", "DeflectFireWizard", "FireWorm"
)), new ArrayList<>(Arrays.asList("DeflectFireWizard", "SplittingRocky", "Necromancer", "DodgingDragon", "FireWorm"
)), new ArrayList<>(Arrays.asList("DeflectFireWizard","SplittingRocky", "Necromancer"
)), new ArrayList<>(Arrays.asList("DodgingDragon", "DeflectFireWizard", "SplittingRocky", "Necromancer"
)), new ArrayList<>(Arrays.asList("FireWorm", "DeflectWizard", "DodgingDragon"
)), new ArrayList<>(Arrays.asList("FireWorm", "DeflectWizard", "Necromancer"
)), new ArrayList<>(Arrays.asList("Necromancer", "DeflectFireWizard", "SplittingRocky", "DodgingDragon", "FireWorm"
))
));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void setUp() {
resourceService.loadTextureAtlases(atlas);
resourceService.loadAll();

WaveService waveService = mock(WaveService.class);
WaveService waveService = new WaveService();
ServiceLocator.registerWaveService(waveService);

baseMob = createSplitMob(BASE_AMOUNT);
Expand Down

0 comments on commit 289adff

Please sign in to comment.