Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Team 3 Pull Request Sprint 4 #294

Merged
merged 104 commits into from
Oct 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
81214e2
ForestGameArea clean up into AssetLoader
Gaganx0 Oct 7, 2023
8cfb8af
LoadingScreen
Gaganx0 Oct 7, 2023
f970693
LoadingScreen update
Gaganx0 Oct 7, 2023
b9a5fcd
LoadingScreen updated
Gaganx0 Oct 7, 2023
e2dde73
Merge branch 'main' of https://github.com/UQcsse3200/2023-studio-3 in…
Gaganx0 Oct 7, 2023
fde2634
Help Screens Creation
Gaganx0 Oct 7, 2023
f0f8c2e
Basic code for new screens
Gaganx0 Oct 7, 2023
b961b8c
Buttons and transition logic for new help screens
Gaganx0 Oct 7, 2023
5e8ecb0
Basic Tower help screen
Gaganx0 Oct 7, 2023
bdbd074
Buttons update
Gaganx0 Oct 7, 2023
4eb450c
BossMobs help screen creation, Updated Bgs
Gaganx0 Oct 7, 2023
fc3ad18
TowerDescriptionHelpScreen updated
Gaganx0 Oct 7, 2023
c3c0c1c
Typos fixed
Gaganx0 Oct 7, 2023
84acccc
Game Description screen layout and placeholder images addd
Gaganx0 Oct 8, 2023
0693734
Images added to GameDescriptionHelpScreen
Gaganx0 Oct 8, 2023
24d2e20
Images added to GameDescriptionHelpScreen
Gaganx0 Oct 8, 2023
338e133
Text added for the images
Gaganx0 Oct 8, 2023
91d85cd
How to play screen added
Gaganx0 Oct 8, 2023
1ea8bf7
How to play screen described
Gaganx0 Oct 8, 2023
45000f6
Added WinningScreen
Moksh-Mehta7 Oct 9, 2023
0a16e65
Added NextLevelScreen
Moksh-Mehta7 Oct 9, 2023
e8e6e98
Text descriptions for Mobs in mobdescriptionscreen
Gaganx0 Oct 9, 2023
060d0b1
Images for Mobs in mobdescriptionscreen
Gaganx0 Oct 9, 2023
030a2ea
Image size and path fixed
Gaganx0 Oct 9, 2023
fc9f6dc
Images and description for mob bosses
Gaganx0 Oct 9, 2023
af06f6f
Images resized, stage added.
Gaganx0 Oct 9, 2023
0d1ac2e
Tuturial button added
Gaganx0 Oct 9, 2023
c60d6ae
Base code( MainGameScreen) code added to tutorial
Gaganx0 Oct 9, 2023
027ef30
Added base ingame code for tutorial( Forestgamearea)
Gaganx0 Oct 9, 2023
bcc94d0
Game Title added to Main Menu
aadityayadav17 Oct 11, 2023
ac6098e
Merge remote-tracking branch 'origin/t3branch' into t3branch
Gaganx0 Oct 11, 2023
1d72e17
Merge remote-tracking branch 'origin/t3branch' into t3branch
Moksh-Mehta7 Oct 12, 2023
acd198f
Merge branch 'Team-4---Waves' into t3branch
Moksh-Mehta7 Oct 13, 2023
f5dc0a6
Main Menu Screen - Added title, fixed resizing issue & reduce redundancy
aadityayadav17 Oct 13, 2023
5bbb999
Merge remote-tracking branch 'origin/t3branch' into t3branch
Moksh-Mehta7 Oct 14, 2023
faafb4b
SettingsScreen resizing issue fixed
aadityayadav17 Oct 14, 2023
e21eaf1
Merge remote-tracking branch 'origin/t3branch' into t3branch
Moksh-Mehta7 Oct 14, 2023
e445867
Merge remote-tracking branch 'origin/Team4-LevelCompleted-Megan' into…
Moksh-Mehta7 Oct 14, 2023
7dd01a8
Added Triggers to the Next and win screen
Moksh-Mehta7 Oct 14, 2023
7e80840
Added Background to Next Level Screen
Moksh-Mehta7 Oct 14, 2023
afbc6be
Added Background to Losing Screen
Moksh-Mehta7 Oct 14, 2023
930155a
made next level working goes to level select
Moksh-Mehta7 Oct 14, 2023
a8f8e3b
made next level working goes to level select
Moksh-Mehta7 Oct 14, 2023
fd986c1
Added Java Doc
Moksh-Mehta7 Oct 14, 2023
867accd
Tutorial clean up and next button
Gaganx0 Oct 15, 2023
03e729f
Merge remote-tracking branch 'origin/t3branch' into t3branch
Gaganx0 Oct 15, 2023
9b3cb8a
merge error fixed
Gaganx0 Oct 15, 2023
826721a
Team 3
Moksh-Mehta7 Oct 15, 2023
c2f47ce
Merge remote-tracking branch 'origin/t3branch' into t3branch
Moksh-Mehta7 Oct 15, 2023
54fce2b
LevelLock 1/n
aadityayadav17 Oct 15, 2023
af99a9a
Merge remote-tracking branch 'origin/t3branch' into t3branch
aadityayadav17 Oct 15, 2023
b7d4ae4
implemented story screen again
Octagunn Oct 16, 2023
f693651
Merge remote-tracking branch 'origin/t3branch' into t3branch
Octagunn Oct 16, 2023
ff11ce5
Pause on open in tutorial
Gaganx0 Oct 16, 2023
9f39a2c
Merge remote-tracking branch 'origin/t3branch' into t3branch
aadityayadav17 Oct 16, 2023
d8a72bc
LevelLock 2/n
aadityayadav17 Oct 16, 2023
b05f6ac
LevelLock 3/n
aadityayadav17 Oct 16, 2023
f1a5828
Buttons adjusted
Gaganx0 Oct 16, 2023
3a91919
Tutorial instructions added
Gaganx0 Oct 16, 2023
b2f6940
LevelLock 4/n
aadityayadav17 Oct 16, 2023
0156ebf
LevelLock 5/n
aadityayadav17 Oct 16, 2023
93b7bbb
Next Button logic added
Gaganx0 Oct 16, 2023
92ddf34
Next continue backend
Gaganx0 Oct 16, 2023
4cad466
implemented level select screen
Octagunn Oct 16, 2023
401e3ae
Merge remote-tracking branch 'origin/t3branch' into t3branch
Gaganx0 Oct 16, 2023
fb9f76b
Tutorial Completed
Gaganx0 Oct 16, 2023
9b8a3a6
Merge remote-tracking branch 'origin/t3branch' into t3branch
aadityayadav17 Oct 16, 2023
5d34913
Tutorial errors fixed
Gaganx0 Oct 16, 2023
62dce2c
LevelLock 6/n
aadityayadav17 Oct 16, 2023
8ff669a
Merge remote-tracking branch 'origin/t3branch' into t3branch
Gaganx0 Oct 16, 2023
c37532c
Merged Main into T3
Moksh-Mehta7 Oct 16, 2023
b1ae073
Fixed some error
Moksh-Mehta7 Oct 16, 2023
31ad595
Resizing fixed
aadityayadav17 Oct 16, 2023
1d13463
Removed Boxed Boy
Moksh-Mehta7 Oct 16, 2023
d35d359
Removed Boxed Boy
Moksh-Mehta7 Oct 16, 2023
34848ec
Merge errors fixed
Gaganx0 Oct 16, 2023
e84a4cb
Merge remote-tracking branch 'origin/t3branch' into t3branch
Gaganx0 Oct 16, 2023
a3494f4
made changes in losing screen
Moksh-Mehta7 Oct 16, 2023
3a9925c
made changes in NextLevelScreen
Moksh-Mehta7 Oct 16, 2023
e908c51
Story Screen
aadityayadav17 Oct 16, 2023
8e29c7e
Loading Screen
Gaganx0 Oct 16, 2023
26b6b96
loading screen
Nidhidass1 Oct 16, 2023
79ace2b
Loading Screen Background Added
Nidhidass1 Oct 16, 2023
63fbd88
Merge remote-tracking branch 'origin/t3branch' into t3branch
Moksh-Mehta7 Oct 16, 2023
a1638fe
LevelSelect Screen planet border fixed
Gaganx0 Oct 16, 2023
dba8a7a
made changes in WinningScreen
Moksh-Mehta7 Oct 16, 2023
1f34223
Merge remote-tracking branch 'origin/t3branch' into t3branch
Moksh-Mehta7 Oct 16, 2023
eb0cae2
Font Change for LevelSelectScreen
aadityayadav17 Oct 16, 2023
a1ec628
Merge remote-tracking branch 'origin/t3branch' into t3branch
aadityayadav17 Oct 16, 2023
0a8b568
MainMenuScreen Maintainability
aadityayadav17 Oct 16, 2023
f9381ad
Added Test file for AnimationTexturePair
Moksh-Mehta7 Oct 16, 2023
a70be9d
Added Java Doc
Gaganx0 Oct 16, 2023
2a4f41e
Added JavaDoc
aadityayadav17 Oct 16, 2023
0602b96
Merge remote-tracking branch 'origin/t3branch' into t3branch
aadityayadav17 Oct 16, 2023
7584f55
Merge branch 'main' into t3branch
aadityayadav17 Oct 16, 2023
2c371a0
Added Test file for AssetLoader
Moksh-Mehta7 Oct 16, 2023
a63bfb0
Merge
aadityayadav17 Oct 16, 2023
667df0c
Merge remote-tracking branch 'origin/t3branch' into t3branch
Moksh-Mehta7 Oct 16, 2023
346aeed
Back button in tutorial
Gaganx0 Oct 16, 2023
d4d0e1c
Merge branch 'main' into t3branch
aadityayadav17 Oct 17, 2023
e011f17
merge main in t3branch
aadityayadav17 Oct 17, 2023
f926875
Merge branch 'main' into t3branch
aadityayadav17 Oct 17, 2023
4260c71
Merge branch 'main' of https://github.com/UQcsse3200/2023-studio-3 in…
Gaganx0 Oct 17, 2023
242dbbe
Merge branch 'main' into t3branch
Moksh-Mehta7 Oct 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
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
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.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
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();
}
}
}
23 changes: 12 additions & 11 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 @@ -292,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 Down Expand Up @@ -346,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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,19 @@ public MainGameActions(GdxGame game) {
public void create() {
entity.getEvents().addListener("exit", this::onExit);
entity.getEvents().addListener("lose", this::onLose);
//entity.getEvents().addListener("win", this::onWin);
entity.getEvents().addListener("win", this::WinningScreen);
entity.getEvents().addListener("Next Level", this::NextLevel);
}

private void NextLevel() {
logger.info("Next level");
game.setScreen(GdxGame.ScreenType.Next_Screen);

}

private void WinningScreen() {
logger.info("Uer Won the game");
game.setScreen(GdxGame.ScreenType.Win_Screen);
}

/**
Expand All @@ -35,6 +47,4 @@ private void onExit() {
private void onLose() {
game.setScreen(GdxGame.ScreenType.LOSING_SCREEN);
}

// private void onWin() { game.setScreen(GdxGame.ScreenType.WIN_SCREEN);} // TODO : Uncomment this once win screen implemented
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import com.csse3200.game.GdxGame;
import com.csse3200.game.components.Component;
import com.csse3200.game.screens.HelpScreen;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,13 @@ private void addActors() {
cursorPixmap.dispose(); // Dispose of the Pixmap to release resources

table = new Table();
table1 = new Table();
table.setFillParent(true);
table1.setFillParent(true);
stage.addActor(table);

Image title =
new Image(
ServiceLocator.getResourceService()
.getAsset("images/background/main_menu/main_menu_bg.png", Texture.class));
Texture backgroundTexture = ServiceLocator.getResourceService().getAsset("images/background/main_menu/main_menu_bg.png", Texture.class);
Image title = new Image(backgroundTexture);
title.setFillParent(true);
table.addActorAt(0, title);
title.setWidth(Gdx.graphics.getWidth());
title.setHeight(Gdx.graphics.getHeight());
title.setPosition(0, 0);
Expand Down Expand Up @@ -126,18 +125,13 @@ public void changed(ChangeEvent changeEvent, Actor actor) {
float padTopOtherBtns = 15f / originalScreenHeight * Gdx.graphics.getHeight();


table.add(title);
table1.row();
table1.add(startBtn).padTop(padTopStartBtn);
table1.row();
table1.add(helpBtn).padTop(padTopOtherBtns);
table1.row();
table1.add(settingsBtn).padTop(padTopOtherBtns);
table1.row();
table1.add(exitBtn).padTop(padTopOtherBtns);
table.center();
table.add(startBtn).padTop(250f).center().row();
table.add(helpBtn).padTop(15f).center().row();
table.add(settingsBtn).padTop(15f).center().row();
table.add(exitBtn).padTop(15f).center().row();

stage.addActor(table);
stage.addActor(table1);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import com.badlogic.gdx.math.Vector2;
import com.csse3200.game.ai.tasks.DefaultTask;
import com.csse3200.game.ai.tasks.PriorityTask;
import com.csse3200.game.areas.ForestGameArea;
import com.csse3200.game.components.CombatStatsComponent;
import com.csse3200.game.entities.Entity;
import com.csse3200.game.entities.factories.ProjectileFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import com.badlogic.gdx.utils.Scaling;
import com.csse3200.game.ai.tasks.AITaskComponent;
import com.csse3200.game.ai.tasks.PriorityTask;
import com.csse3200.game.areas.ForestGameArea;
import com.csse3200.game.areas.*;
import com.csse3200.game.components.CombatStatsComponent;
import com.csse3200.game.components.tasks.TowerCombatTask;
import com.csse3200.game.components.tower.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/**
* Represents a pair of animation and texture for rendering in a game screen.
* Provides easy access to the animation and its associated texture.
*
* @param <TextureRegion> The type of texture region used in the animation.
*/
package com.csse3200.game.screens;

import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.Animation;
import com.badlogic.gdx.graphics.g2d.TextureRegion;

public class AnimationTexturePair {
public final Animation<TextureRegion> animation;
public final Texture texture;

/**
* Creates an {@code AnimationTexturePair} with the specified animation and texture.
*
* @param animation The animation to be associated with this pair.
* @param texture The texture to be associated with this pair.
*/
public AnimationTexturePair(Animation<TextureRegion> animation, Texture texture) {
this.animation = animation;
this.texture = texture;
}

/**
* Gets the animation associated with this pair.
*
* @return The animation.
*/
public Animation<TextureRegion> getAnimation() {
return animation;
}

/**
* Gets the texture associated with this pair.
*
* @return The texture.
*/
public Texture getTexture() {
return texture;
}
}
24 changes: 19 additions & 5 deletions source/core/src/main/com/csse3200/game/screens/AssetLoader.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
package com.csse3200.game.screens;

import com.badlogic.gdx.audio.Music;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.audio.Sound;
import com.csse3200.game.areas.ForestGameArea;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.TextureAtlas;
import com.csse3200.game.services.ResourceService;
import com.csse3200.game.services.ServiceLocator;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

public class AssetLoader {
private static final Set<String> loadedAssets = new HashSet<>();
// Define your asset file paths here
public static final String[] textures = {
"images/desert_bg.png",
Expand Down Expand Up @@ -85,7 +89,8 @@ public class AssetLoader {
"images/highlight_tile.png",
"images/ui/Sprites/UI_Glass_Toggle_Bar_01a.png",
"images/green_tile.png",
"images/red_tile.png"
"images/red_tile.png",
"images/HelpScreen/hs.jpg"
};

public static final String[] textureAtlases = {
Expand Down Expand Up @@ -136,6 +141,7 @@ public class AssetLoader {
};

public static final String[] Sounds = {
"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 @@ -235,5 +241,13 @@ public static Sound getSound(String assetPath) {
public static Music getMusic(String assetPath) {
return ServiceLocator.getResourceService().getAsset(assetPath, Music.class);
}
}

public static boolean areAllAssetsLoaded() {
ResourceService resourceService = ServiceLocator.getResourceService();

return loadedAssets.containsAll(Arrays.asList(textures)) &&
loadedAssets.containsAll(Arrays.asList(textureAtlases)) &&
loadedAssets.containsAll(Arrays.asList(Sounds)) &&
loadedAssets.containsAll(Arrays.asList(music));
}
}
Loading
Loading