Skip to content

Commit

Permalink
Fixed merge conflicts.
Browse files Browse the repository at this point in the history
  • Loading branch information
praneetdhoolia committed Oct 17, 2023
2 parents 59f5f15 + 7ecd745 commit 6b9966e
Show file tree
Hide file tree
Showing 369 changed files with 5,013 additions and 2,418 deletions.
20 changes: 10 additions & 10 deletions source/core/assets/configs/tower.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,51 +2,51 @@
"income": {
"health": 10,
"baseAttack": 0,
"cost": 10
"cost": 100
},
"wall": {
"health": 300,
"baseAttack": 0,
"cost": 45
"cost": 200
},
"TNTTower": {
"health": 10,
"baseAttack": 5,
"cost": 30
"cost": 50
},
"weapon": {
"health": 75,
"baseAttack": 15,
"cost": 15
"cost": 50
},
"DroidTower": {
"health": 100,
"baseAttack": 25,
"cost": 45
"cost": 300
},
"fireTower": {
"health": 100,
"baseAttack": 25,
"cost": 45
"cost": 300
},
"stunTower": {
"health": 100,
"baseAttack": 25,
"cost": 45
"cost": 500
},
"fireworksTower": {
"health": 125,
"baseAttack": 45,
"cost": 70
"cost": 500
},
"pierceTower": {
"health": 125,
"baseAttack": 45,
"cost": 70
"cost": 500
},
"ricochetTower": {
"health": 125,
"baseAttack": 45,
"cost": 70
"cost": 500
}
}
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.
49 changes: 7 additions & 42 deletions source/core/assets/images/mobs/skeleton.atlas
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ skeleton_attack
index: -1
skeleton_attack
rotate: false
xy: 514, 2
xy: 578, 52
size: 62, 48
orig: 62, 48
offset: 0, 0
Expand All @@ -83,7 +83,7 @@ skeleton_attack
index: -1
skeleton_attack
rotate: false
xy: 770, 2
xy: 834, 52
size: 62, 48
orig: 62, 48
offset: 0, 0
Expand All @@ -95,41 +95,6 @@ skeleton_attack
orig: 62, 48
offset: 0, 0
index: -1
skeleton_death
rotate: false
xy: 1026, 2
size: 62, 48
orig: 62, 48
offset: 0, 0
index: -1
skeleton_death
rotate: false
xy: 66, 52
size: 62, 48
orig: 62, 48
offset: 0, 0
index: -1
skeleton_death
rotate: false
xy: 834, 52
size: 62, 48
orig: 62, 48
offset: 0, 0
index: -1
skeleton_death
rotate: false
xy: 1154, 55
size: 62, 45
orig: 62, 45
offset: 0, 0
index: -1
skeleton_death
rotate: false
xy: 578, 2
size: 62, 48
orig: 62, 48
offset: 0, 0
index: -1
skeleton_death
rotate: false
xy: 194, 52
Expand Down Expand Up @@ -188,7 +153,7 @@ skeleton_walk
index: -1
skeleton_walk
rotate: false
xy: 514, 52
xy: 514, 2
size: 62, 48
orig: 62, 48
offset: 0, 0
Expand All @@ -202,7 +167,7 @@ skeleton_walk
index: -1
skeleton_walk
rotate: false
xy: 770, 52
xy: 770, 2
size: 62, 48
orig: 62, 48
offset: 0, 0
Expand Down Expand Up @@ -237,21 +202,21 @@ skeleton_walk
index: -1
skeleton_walk
rotate: false
xy: 578, 52
xy: 514, 52
size: 62, 48
orig: 62, 48
offset: 0, 0
index: -1
skeleton_walk
rotate: false
xy: 130, 2
xy: 66, 52
size: 62, 48
orig: 62, 48
offset: 0, 0
index: -1
skeleton_walk
rotate: false
xy: 834, 2
xy: 770, 52
size: 62, 48
orig: 62, 48
offset: 0, 0
Expand Down
Binary file modified source/core/assets/images/mobs/skeleton.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.
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
@@ -1,7 +1,6 @@
package com.csse3200.game.ai.tasks;

import com.csse3200.game.components.Component;
import com.csse3200.game.components.ComponentType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down Expand Up @@ -46,8 +45,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 +82,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
Loading

0 comments on commit 6b9966e

Please sign in to comment.