-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into Team-7--Tower-Stat-Alterations
- Loading branch information
Showing
55 changed files
with
1,240 additions
and
744 deletions.
There are no files selected for viewing
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.
191 changes: 191 additions & 0 deletions
191
source/core/assets/images/ui/buttons/determination_mono_22.fnt
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
source/core/src/main/com/csse3200/game/areas/terrain/TerrainGrid.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
source/core/src/main/com/csse3200/game/components/maingame/LevelProgressBar.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
package com.csse3200.game.components.maingame; | ||
|
||
import com.badlogic.gdx.audio.Music; | ||
import com.badlogic.gdx.graphics.Color; | ||
import com.badlogic.gdx.graphics.Pixmap; | ||
import com.badlogic.gdx.graphics.Texture; | ||
import com.badlogic.gdx.graphics.g2d.TextureRegion; | ||
import com.badlogic.gdx.scenes.scene2d.ui.ProgressBar; | ||
import com.badlogic.gdx.scenes.scene2d.utils.Drawable; | ||
import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable; | ||
import com.csse3200.game.screens.GameLevelData; | ||
import com.csse3200.game.services.ServiceLocator; | ||
|
||
public class LevelProgressBar extends ProgressBar { | ||
|
||
static int selectedLevel = GameLevelData.getSelectedLevel(); | ||
|
||
/** | ||
* @param width of the health bar | ||
* @param height of the health bar | ||
*/ | ||
public LevelProgressBar(int width, int height) { | ||
super(0f, getMobCount(), 0.01f, false, new ProgressBarStyle()); | ||
getStyle().background = getColoredDrawable(width, height, Color.RED); | ||
getStyle().knob = new TextureRegionDrawable(new TextureRegion(new Texture("images/skeleton.png"))); | ||
getStyle().knobBefore = getColoredDrawable(width, height, Color.GREEN); | ||
|
||
setWidth(width); | ||
setHeight(height); | ||
|
||
setAnimateDuration(0.0f); | ||
setValue(1f); | ||
|
||
setAnimateDuration(0.25f); | ||
} | ||
|
||
/** | ||
* Color filling for the Progress Bar | ||
* @param width the width in pixels | ||
* @param height the height in pixels | ||
* @param color the color of the filling | ||
* @return Drawable | ||
*/ | ||
public static Drawable getColoredDrawable(int width, int height, Color color) { | ||
Pixmap pixmap = new Pixmap(width, height, Pixmap.Format.RGBA8888); | ||
pixmap.setColor(color); | ||
pixmap.fill(); | ||
|
||
TextureRegionDrawable drawable = new TextureRegionDrawable(new TextureRegion(new Texture(pixmap))); | ||
|
||
pixmap.dispose(); | ||
|
||
return drawable; | ||
} | ||
|
||
/** | ||
* Get the number of mobs based on the level | ||
* @return number of total mobs | ||
*/ | ||
public static int getMobCount() { | ||
|
||
switch (selectedLevel) { | ||
// Desert | ||
case 1 -> { // Ice | ||
ServiceLocator.getWaveService().setTotalMobs(91); | ||
return 91; | ||
} | ||
case 2 -> { // Lava | ||
ServiceLocator.getWaveService().setTotalMobs(204); | ||
return 204; | ||
} | ||
default -> { | ||
ServiceLocator.getWaveService().setTotalMobs(27); | ||
return 27; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.