Skip to content

Commit

Permalink
Merge branch 'main' into Team-1-Mobs-Enhancement-variations
Browse files Browse the repository at this point in the history
  • Loading branch information
MiniSoda17 committed Oct 17, 2023
2 parents 6a870fd + 91d5dcc commit 73be9d2
Show file tree
Hide file tree
Showing 332 changed files with 5,101 additions and 1,439 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/core/assets/images/HelpScreen/Econ.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/core/assets/images/HelpScreen/Engineer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/core/assets/images/HelpScreen/HTP.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/core/assets/images/HelpScreen/Mob.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/core/assets/images/HelpScreen/Turret.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/core/assets/images/HelpScreen/hs.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/core/assets/images/LoadingScreen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/core/assets/images/background/main_menu/main_menu_bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/core/assets/images/background/settings/settings_bg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/core/assets/images/ui/Screen/Losing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added source/core/assets/images/ui/Screen/Nextlevel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
219 changes: 120 additions & 99 deletions source/core/assets/images/ui/buttons/glass.atlas

Large diffs are not rendered by default.

108 changes: 108 additions & 0 deletions source/core/assets/images/ui/buttons/glass.json
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,87 @@ com.badlogic.gdx.scenes.scene2d.ui.Skin$TintedDrawable: {
a: 1
}
}
pierce_tower_selected: {
name: pierce-tower-default
color: {
r: 0
g: 0.74509805
b: 0.003921569
a: 1
}
}
ricochet_tower_selected: {
name: ricochet-tower-default
color: {
r: 0
g: 0.74509805
b: 0.003921569
a: 1
}
}
firework_tower_selected: {
name: firework-tower-default
color: {
r: 0
g: 0.74509805
b: 0.003921569
a: 1
}
}
pierce_tower_disabled: {
name: pierce-tower-default
color: {
r: 0.8156863
g: 0
b: 0
a: 1
}
}
ricochet_tower_disabled: {
name: ricochet-tower-default
color: {
r: 0.8156863
g: 0
b: 0
a: 1
}
}
firework_tower_disabled: {
name: firework-tower-default
color: {
r: 0.8156863
g: 0
b: 0
a: 1
}
}
pierce_tower_over: {
name: pierce-tower-default
color: {
r: 0
g: 0.9137255
b: 0.9843137
a: 1
}
}
ricochet_tower_over: {
name: ricochet-tower-default
color: {
r: 0
g: 0.9137255
b: 0.9843137
a: 1
}
}
firework_tower_over: {
name: firework-tower-default
color: {
r: 0
g: 0.9137255
b: 0.9843137
a: 1
}
}
}
com.badlogic.gdx.scenes.scene2d.ui.Button$ButtonStyle: {
default: {
Expand Down Expand Up @@ -396,6 +477,33 @@ com.badlogic.gdx.scenes.scene2d.ui.ImageButton$ImageButtonStyle: {
imageCheckedDown: mine_tower_down
imageCheckedOver: mine_tower_over
}
pierce_tower: {
imageUp: pierce-tower-default
imageDown: pierce_tower_selected
imageOver: pierce_tower_over
imageDisabled: pierce_tower_disabled
imageChecked: pierce_tower_selected
imageCheckedDown: pierce_tower_selected
imageCheckedOver: pierce_tower_over
}
ricochet_tower: {
imageUp: ricochet-tower-default
imageDown: ricochet_tower_selected
imageOver: ricochet_tower_over
imageDisabled: ricochet_tower_disabled
imageChecked: ricochet_tower_selected
imageCheckedDown: ricochet_tower_selected
imageCheckedOver: ricochet_tower_over
}
fireworks_tower: {
imageUp: firework-tower-default
imageDown: firework_tower_selected
imageOver: firework_tower_over
imageDisabled: firework_tower_disabled
imageChecked: firework_tower_selected
imageCheckedDown: firework_tower_selected
imageCheckedOver: firework_tower_over
}
}
com.badlogic.gdx.scenes.scene2d.ui.Label$LabelStyle: {
default: {
Expand Down
Binary file modified source/core/assets/images/ui/buttons/glass.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/core/assets/images/ui/game screen/1 earth before.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/core/assets/images/ui/game screen/1.1 earth before.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified source/core/assets/images/ui/game screen/2.0 earth dying.png
Binary file modified source/core/assets/images/ui/game screen/2.1 earth dying.png
Binary file modified source/core/assets/images/ui/game screen/3. meeting.png
Binary file modified source/core/assets/images/ui/game screen/3.1 meeting turret.png
Binary file modified source/core/assets/images/ui/game screen/4.0 spaceship built.png
Binary file modified source/core/assets/images/ui/game screen/5 arrival.png
Binary file modified source/core/assets/images/ui/game screen/5.1 arrival.png
Binary file modified source/core/assets/images/ui/game screen/6.0 survey.png
Binary file modified source/core/assets/images/ui/game screen/6.1 survey.png
Binary file added source/core/assets/planets/Desert_bw/1/1.png
Binary file added source/core/assets/planets/Desert_bw/1/10.png
Binary file added source/core/assets/planets/Desert_bw/1/11.png
Binary file added source/core/assets/planets/Desert_bw/1/12.png
Binary file added source/core/assets/planets/Desert_bw/1/13.png
Binary file added source/core/assets/planets/Desert_bw/1/14.png
Binary file added source/core/assets/planets/Desert_bw/1/15.png
Binary file added source/core/assets/planets/Desert_bw/1/16.png
Binary file added source/core/assets/planets/Desert_bw/1/17.png
Binary file added source/core/assets/planets/Desert_bw/1/18.png
Binary file added source/core/assets/planets/Desert_bw/1/19.png
Binary file added source/core/assets/planets/Desert_bw/1/2.png
Binary file added source/core/assets/planets/Desert_bw/1/20.png
Binary file added source/core/assets/planets/Desert_bw/1/21.png
Binary file added source/core/assets/planets/Desert_bw/1/22.png
Binary file added source/core/assets/planets/Desert_bw/1/23.png
Binary file added source/core/assets/planets/Desert_bw/1/24.png
Binary file added source/core/assets/planets/Desert_bw/1/25.png
Binary file added source/core/assets/planets/Desert_bw/1/26.png
Binary file added source/core/assets/planets/Desert_bw/1/27.png
Binary file added source/core/assets/planets/Desert_bw/1/28.png
Binary file added source/core/assets/planets/Desert_bw/1/29.png
Binary file added source/core/assets/planets/Desert_bw/1/3.png
Binary file added source/core/assets/planets/Desert_bw/1/30.png
Binary file added source/core/assets/planets/Desert_bw/1/31.png
Binary file added source/core/assets/planets/Desert_bw/1/32.png
Binary file added source/core/assets/planets/Desert_bw/1/33.png
Binary file added source/core/assets/planets/Desert_bw/1/34.png
Binary file added source/core/assets/planets/Desert_bw/1/35.png
Binary file added source/core/assets/planets/Desert_bw/1/36.png
Binary file added source/core/assets/planets/Desert_bw/1/37.png
Binary file added source/core/assets/planets/Desert_bw/1/38.png
Binary file added source/core/assets/planets/Desert_bw/1/39.png
Binary file added source/core/assets/planets/Desert_bw/1/4.png
Binary file added source/core/assets/planets/Desert_bw/1/40.png
Binary file added source/core/assets/planets/Desert_bw/1/41.png
Binary file added source/core/assets/planets/Desert_bw/1/42.png
Binary file added source/core/assets/planets/Desert_bw/1/43.png
Binary file added source/core/assets/planets/Desert_bw/1/44.png
Binary file added source/core/assets/planets/Desert_bw/1/45.png
Binary file added source/core/assets/planets/Desert_bw/1/46.png
Binary file added source/core/assets/planets/Desert_bw/1/47.png
Binary file added source/core/assets/planets/Desert_bw/1/48.png
Binary file added source/core/assets/planets/Desert_bw/1/49.png
Binary file added source/core/assets/planets/Desert_bw/1/5.png
Binary file added source/core/assets/planets/Desert_bw/1/50.png
Binary file added source/core/assets/planets/Desert_bw/1/51.png
Binary file added source/core/assets/planets/Desert_bw/1/52.png
Binary file added source/core/assets/planets/Desert_bw/1/53.png
Binary file added source/core/assets/planets/Desert_bw/1/54.png
Binary file added source/core/assets/planets/Desert_bw/1/55.png
Binary file added source/core/assets/planets/Desert_bw/1/56.png
Binary file added source/core/assets/planets/Desert_bw/1/57.png
Binary file added source/core/assets/planets/Desert_bw/1/58.png
Binary file added source/core/assets/planets/Desert_bw/1/59.png
Binary file added source/core/assets/planets/Desert_bw/1/6.png
Binary file added source/core/assets/planets/Desert_bw/1/60.png
Binary file added source/core/assets/planets/Desert_bw/1/7.png
Binary file added source/core/assets/planets/Desert_bw/1/8.png
Binary file added source/core/assets/planets/Desert_bw/1/9.png
Binary file added source/core/assets/planets/Lava_bw/1/1.png
Binary file added source/core/assets/planets/Lava_bw/1/10.png
Binary file added source/core/assets/planets/Lava_bw/1/11.png
Binary file added source/core/assets/planets/Lava_bw/1/12.png
Binary file added source/core/assets/planets/Lava_bw/1/13.png
Binary file added source/core/assets/planets/Lava_bw/1/14.png
Binary file added source/core/assets/planets/Lava_bw/1/15.png
Binary file added source/core/assets/planets/Lava_bw/1/16.png
Binary file added source/core/assets/planets/Lava_bw/1/17.png
Binary file added source/core/assets/planets/Lava_bw/1/18.png
Binary file added source/core/assets/planets/Lava_bw/1/19.png
Binary file added source/core/assets/planets/Lava_bw/1/2.png
Binary file added source/core/assets/planets/Lava_bw/1/20.png
Binary file added source/core/assets/planets/Lava_bw/1/21.png
Binary file added source/core/assets/planets/Lava_bw/1/22.png
Binary file added source/core/assets/planets/Lava_bw/1/23.png
Binary file added source/core/assets/planets/Lava_bw/1/24.png
Binary file added source/core/assets/planets/Lava_bw/1/25.png
Binary file added source/core/assets/planets/Lava_bw/1/26.png
Binary file added source/core/assets/planets/Lava_bw/1/27.png
Binary file added source/core/assets/planets/Lava_bw/1/28.png
Binary file added source/core/assets/planets/Lava_bw/1/29.png
Binary file added source/core/assets/planets/Lava_bw/1/3.png
Binary file added source/core/assets/planets/Lava_bw/1/30.png
Binary file added source/core/assets/planets/Lava_bw/1/31.png
Binary file added source/core/assets/planets/Lava_bw/1/32.png
Binary file added source/core/assets/planets/Lava_bw/1/33.png
Binary file added source/core/assets/planets/Lava_bw/1/34.png
Binary file added source/core/assets/planets/Lava_bw/1/35.png
Binary file added source/core/assets/planets/Lava_bw/1/36.png
Binary file added source/core/assets/planets/Lava_bw/1/37.png
Binary file added source/core/assets/planets/Lava_bw/1/38.png
Binary file added source/core/assets/planets/Lava_bw/1/39.png
Binary file added source/core/assets/planets/Lava_bw/1/4.png
Binary file added source/core/assets/planets/Lava_bw/1/40.png
Binary file added source/core/assets/planets/Lava_bw/1/41.png
Binary file added source/core/assets/planets/Lava_bw/1/42.png
Binary file added source/core/assets/planets/Lava_bw/1/43.png
Binary file added source/core/assets/planets/Lava_bw/1/44.png
Binary file added source/core/assets/planets/Lava_bw/1/45.png
Binary file added source/core/assets/planets/Lava_bw/1/46.png
Binary file added source/core/assets/planets/Lava_bw/1/47.png
Binary file added source/core/assets/planets/Lava_bw/1/48.png
Binary file added source/core/assets/planets/Lava_bw/1/49.png
Binary file added source/core/assets/planets/Lava_bw/1/5.png
Binary file added source/core/assets/planets/Lava_bw/1/50.png
Binary file added source/core/assets/planets/Lava_bw/1/51.png
Binary file added source/core/assets/planets/Lava_bw/1/52.png
Binary file added source/core/assets/planets/Lava_bw/1/53.png
Binary file added source/core/assets/planets/Lava_bw/1/54.png
Binary file added source/core/assets/planets/Lava_bw/1/55.png
Binary file added source/core/assets/planets/Lava_bw/1/56.png
Binary file added source/core/assets/planets/Lava_bw/1/57.png
Binary file added source/core/assets/planets/Lava_bw/1/58.png
Binary file added source/core/assets/planets/Lava_bw/1/59.png
Binary file added source/core/assets/planets/Lava_bw/1/6.png
Binary file added source/core/assets/planets/Lava_bw/1/60.png
Binary file added source/core/assets/planets/Lava_bw/1/7.png
Binary file added source/core/assets/planets/Lava_bw/1/8.png
Binary file added source/core/assets/planets/Lava_bw/1/9.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added source/core/assets/sounds/towers/explosion.mp3
Binary file not shown.
48 changes: 25 additions & 23 deletions source/core/src/main/com/csse3200/game/GdxGame.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.badlogic.gdx.Screen;
import com.csse3200.game.files.UserSettings;
import com.csse3200.game.screens.*;
import com.csse3200.game.screens.HelpScreen.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -17,7 +18,7 @@
*/
public class GdxGame extends Game {
private static final Logger logger = LoggerFactory.getLogger(GdxGame.class);

public int currentLevel = 0;
@Override
public void create() {
logger.info("Creating game");
Expand Down Expand Up @@ -63,30 +64,31 @@ public void dispose() {
* @return new screen
*/
private Screen newScreen(ScreenType screenType) {
switch (screenType) {
case MAIN_MENU:
return new MainMenuScreen(this);
case MAIN_GAME:
return new MainGameScreen(this);
case SETTINGS:
return new SettingsScreen(this);
case STORY_SCREEN:
return new StoryScreen(this);
case LEVEL_SELECT:
return new LevelSelectScreen(this);
case LOSING_SCREEN:
return new LosingScreen(this);
case TURRET_SELECTION:
return new TurretSelectionScreen(this);
case HELP_SCREEN:
return new HelpScreen(this);
default:
return null;
}
return switch (screenType) {
case Next_Screen -> new NextLevelScreen(this, currentLevel);
case Win_Screen -> new WinningScreen(this);
case MAIN_MENU -> new MainMenuScreen(this);
case MAIN_GAME -> new MainGameScreen(this);
case SETTINGS -> new SettingsScreen(this);
case STORY_SCREEN -> new StoryScreen(this);
case LEVEL_SELECT -> new LevelSelectScreen(this, currentLevel);
case LOSING_SCREEN -> new LosingScreen(this);
case TURRET_SELECTION -> new TurretSelectionScreen(this);
case HELP_SCREEN -> new GameDescriptionHelpScreen(this);
case HELP_MOBS_SCREEN -> new MobsDescriptionHelpScreen(this);
case HELP_TOWER_SCREEN -> new TowerDescriptionHelpScreen(this);
case HELP_BOSS_SCREEN -> new BossDescriptionHelpScreen(this);
case LOAD_SCREEN -> new LoadingScreen(this);
case HOW_TO_PLAY -> new HowToPlay(this);

case TUTORIAL_SCREEN-> new Tutorial(this);
default-> null;
};
}

public enum ScreenType {
MAIN_MENU, MAIN_GAME, SETTINGS, STORY_SCREEN, LEVEL_SELECT, TURRET_SELECTION, LOSING_SCREEN, HELP_SCREEN
MAIN_MENU, MAIN_GAME, SETTINGS, STORY_SCREEN, LEVEL_SELECT, TURRET_SELECTION, LOSING_SCREEN, HELP_SCREEN, LOAD_SCREEN,
HELP_MOBS_SCREEN, HELP_TOWER_SCREEN, HELP_BOSS_SCREEN, Win_Screen, Next_Screen, HOW_TO_PLAY, TUTORIAL_SCREEN
}

/**
Expand All @@ -95,4 +97,4 @@ public enum ScreenType {
public void exit() {
app.exit();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ public AITaskComponent addTask(PriorityTask task) {
*/
public <T extends PriorityTask> T getTask(Class<T> task) {
for (PriorityTask priorityTask : priorityTasks) {
if (priorityTask.getClass() == task) {
return (T) priorityTask;
if (task.isInstance(priorityTask)) {
return task.cast(priorityTask);
}
}
logger.info("Task {} not found", task);
Expand Down Expand Up @@ -83,25 +83,17 @@ public void dispose() {
*/
public void disposeAll() {
currentTask = null;
for (int i = 0; i < priorityTasks.size(); i++) {
priorityTasksToBeRestored.add(priorityTasks.get(i));
}
for (int i = 0; i < priorityTasks.size(); i++) {
priorityTasks.remove(i);
}
priorityTasksToBeRestored.addAll(priorityTasks);
priorityTasks.clear();
}

/**
* Restores the priorityTasks List. Adds all of the entity's disposed tasks
* back into priorityTasks.
*/
public void restore() {
for (int i = 0; i < priorityTasksToBeRestored.size(); i++) {
priorityTasks.add(priorityTasksToBeRestored.get(i));
}
for (int i = 0; i < priorityTasksToBeRestored.size(); i++) {
priorityTasksToBeRestored.remove(i);
}
priorityTasks.addAll(priorityTasksToBeRestored);
priorityTasksToBeRestored.clear();
this.update();
}

Expand Down
78 changes: 56 additions & 22 deletions source/core/src/main/com/csse3200/game/areas/ForestGameArea.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ public class ForestGameArea extends GameArea {
"images/mobs/rocky.atlas"
};
private static final String[] forestSounds = {
"sounds/ui/Open_Close/NA_SFUI_Vol1_Open_01.ogg",
"sounds/Impact4.ogg",
"sounds/economy/click.wav",
"sounds/economy/click_1.wav",
Expand Down Expand Up @@ -201,10 +202,14 @@ public class ForestGameArea extends GameArea {
"sounds/mobBoss/patrickThunder.mp3",
"sounds/mobBoss/patrickHit.mp3",
"sounds/mobBoss/spawnDemonSlime.mp3",
"sounds/towers/Desert-Eagle-Far-Single-Gunshot.mp3",
"sounds/towers/5.56_single_shot.mp3",
"sounds/towers/explosion.mp3",
"sounds/towers/eco_tower_ping.mp3",
"sounds/towers/ar15_single_shot_far.mp3",
"sounds/mobs/skeletonHit.mp3",
"sounds/mobs/coatAttack.mp3",
"sounds/mobs/archerArrow.mp3"

};
private static final String BACKGROUND_MUSIC = "sounds/background/Sci-Fi1.ogg";

Expand Down Expand Up @@ -243,6 +248,37 @@ private void stopWaveTimer() {
}
}

/**
* Cases to spawn a wave
*/
// private void spawnWave() {
// wave++;
// switch (wave) {
// case 1:
// case 2:
// spawnFireWorm();
// spawnDragonKnight();
//
// break;
// case 3:
// spawnSkeleton();
// spawnWizard();
// // mobBoss2 = spawnMobBoss2();
// break;
// case 4:
// spawnWaterQueen();
// spawnWaterSlime();
// // mobBoss2 = spawnMobBoss2();
//
// break;
// case 5:
// spawnDemonBoss();
// default:
// // Handle other wave scenarios if needed
// break;
// }
// }

/**
* Create the game area, including terrain, static entities (trees), dynamic entities (player)
*/
Expand All @@ -257,7 +293,7 @@ public void create() {
spawnTerrain();

// Set up infrastructure for end game tracking
// player = spawnPlayer();
// player = spawnPlayer();

logger.info("Creating waves");
waves = WaveFactory.createWaves();
Expand All @@ -267,9 +303,10 @@ public void create() {
spawnScrap();
spawnGapScanners();
}

private void displayUI() {
Entity ui = new Entity();
// ui.addComponent(new GameAreaDisplay("Box Forest")); TODO: This should be the level name?
ui.addComponent(ServiceLocator.getGameEndService().getDisplay());
ui.addComponent(ServiceLocator.getCurrencyService().getDisplay());
spawnEntity(ui);
Expand Down Expand Up @@ -310,18 +347,18 @@ private void spawnTerrain() {

}

private Entity spawnPlayer() {
Entity newPlayer = PlayerFactory.createPlayer();
spawnEntityAt(newPlayer, PLAYER_SPAWN, true, true);
return newPlayer;
}
//private Entity spawnPlayer() {
// Entity newPlayer = PlayerFactory.createPlayer();
// spawnEntityAt(newPlayer, PLAYER_SPAWN, true, true);
// return newPlayer;
// }

// Spawn player at a specific position
private Entity spawnPlayer(GridPoint2 position) {
Entity newPlayer = PlayerFactory.createPlayer();
spawnEntityAt(newPlayer, position, true, true);
return newPlayer;
}
// private Entity spawnPlayer(GridPoint2 position) {
// Entity newPlayer = PlayerFactory.createPlayer();
// spawnEntityAt(newPlayer, position, true, true);
// return newPlayer;
// }

/**
* Spawn an entity on the map. Is called during a wave. Add cases here for each mob type
Expand All @@ -332,6 +369,9 @@ private Entity spawnPlayer(GridPoint2 position) {
public void spawnMob(String entity, GridPoint2 randomPos, int health) {
Entity mob;
switch (entity) {
case "Xeno":
mob = NPCFactory.createXenoGrunt(health);
break;
case "SplittingWaterSlime":
mob = NPCFactory.createSplittingWaterSlime(health);
break;
Expand All @@ -356,6 +396,7 @@ public void spawnMob(String entity, GridPoint2 randomPos, int health) {
case "IceBoss":
mob = MobBossFactory.createIceBoss(health);
break;

case "Coat":
mob = NPCFactory.createCoat(health);
break;
Expand All @@ -368,15 +409,7 @@ public void spawnMob(String entity, GridPoint2 randomPos, int health) {
case "ArcaneArcher":
mob = NPCFactory.createDodgingArcaneArcher(health);
break;
case "SplittingRocky":
mob = NPCFactory.createSplittingRocky(health);
break;
case "Necromancer":
mob = NPCFactory.createNecromancer(health);
break;
case "DeflectFireWizard":
mob = NPCFactory.createDeflectFireWizard(health);
break;

case "PatrickBoss":
mob = MobBossFactory.createPatrickBoss(health);
break;
Expand All @@ -394,6 +427,7 @@ public void spawnMob(String entity, GridPoint2 randomPos, int health) {
spawnEntityAt(mob, randomPos, true, false);
}


private void loadAssets() {
logger.debug("Loading assets");
ResourceService resourceService = ServiceLocator.getResourceService();
Expand Down
Loading

0 comments on commit 73be9d2

Please sign in to comment.