-
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 pull request #267 from UQcsse3200/Mohamad_Juice
Mohamad juice
- Loading branch information
Showing
19 changed files
with
531 additions
and
400 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,37 +1,52 @@ | ||
{ | ||
"weapon": { | ||
"income": { | ||
"health": 10, | ||
"baseAttack": 10, | ||
"baseAttack": 0, | ||
"cost": 10 | ||
}, | ||
"wall": { | ||
"health": 20, | ||
"baseAttack": 0, | ||
"cost": 5 | ||
}, | ||
"income": { | ||
"health": 20, | ||
"health": 300, | ||
"baseAttack": 0, | ||
"cost": 1 | ||
"cost": 45 | ||
}, | ||
"TNTTower": { | ||
"health": 10, | ||
"baseAttack": 5, | ||
"cost": 1 | ||
"cost": 30 | ||
}, | ||
"weapon": { | ||
"health": 75, | ||
"baseAttack": 15, | ||
"cost": 15 | ||
}, | ||
"DroidTower": { | ||
"health": 50, | ||
"baseAttack": 5, | ||
"cost": 1 | ||
"health": 100, | ||
"baseAttack": 25, | ||
"cost": 45 | ||
}, | ||
"fireTower": { | ||
"health": 10, | ||
"baseAttack": 10, | ||
"cost": 10 | ||
"health": 100, | ||
"baseAttack": 25, | ||
"cost": 45 | ||
}, | ||
"stunTower": { | ||
"health": 10, | ||
"baseAttack": 10, | ||
"cost": 10 | ||
"health": 100, | ||
"baseAttack": 25, | ||
"cost": 45 | ||
}, | ||
"fireworksTower": { | ||
"health": 125, | ||
"baseAttack": 45, | ||
"cost": 70 | ||
}, | ||
"pierceTower": { | ||
"health": 125, | ||
"baseAttack": 45, | ||
"cost": 70 | ||
}, | ||
"ricochetTower": { | ||
"health": 125, | ||
"baseAttack": 45, | ||
"cost": 70 | ||
} | ||
} |
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.
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
44 changes: 44 additions & 0 deletions
44
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,44 @@ | ||
package com.csse3200.game.components.maingame; | ||
|
||
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; | ||
|
||
public class LevelProgressBar extends ProgressBar { | ||
|
||
/** | ||
* @param width of the health bar | ||
* @param height of the health bar | ||
*/ | ||
public LevelProgressBar(int width, int height) { | ||
super(0f, 100f, 0.01f, false, new ProgressBarStyle()); | ||
getStyle().background = getColoredDrawable(width, height, Color.RED); | ||
// getStyle().knob = getColoredDrawable(0, height, Color.GREEN); | ||
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); | ||
} | ||
|
||
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; | ||
} | ||
} |
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
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
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.