-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add awards (to some extent) Add death animation and text Fix minor issue with collisions
- Loading branch information
Showing
46 changed files
with
707 additions
and
166 deletions.
There are no files selected for viewing
Submodule assets
updated
26 files
+ − | graphics/awards/america.aseprite | |
+ − | graphics/awards/america.png | |
+ − | graphics/awards/business.aseprite | |
+ − | graphics/awards/business.png | |
+ − | graphics/awards/future.aseprite | |
+ − | graphics/awards/future.png | |
+ − | graphics/awards/leader.aseprite | |
+ − | graphics/awards/leader.png | |
+ − | graphics/characters/David.aseprite | |
+590 −56 | graphics/characters/David.json | |
+ − | graphics/characters/David.png | |
+34 −18 | maps/endscreen.tmx | |
+47 −41 | maps/level1.tmx | |
+48 −42 | maps/level10.tmx | |
+66 −69 | maps/level11.tmx | |
+38 −31 | maps/level12.tmx | |
+47 −41 | maps/level2.tmx | |
+47 −41 | maps/level3.tmx | |
+30 −23 | maps/level4.tmx | |
+27 −21 | maps/level5.tmx | |
+27 −21 | maps/level6.tmx | |
+47 −41 | maps/level7.tmx | |
+47 −41 | maps/level8.tmx | |
+28 −21 | maps/level9.tmx | |
+16 −2 | skin/skin.json | |
+216 −2 | skin/skin.scmp |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package me.srikavin.fbla.game.award | ||
|
||
import me.srikavin.fbla.game.state.GameRules | ||
|
||
class America : Award() { | ||
override fun apply(gameRules: GameRules) { | ||
gameRules.enemiesToGold = true | ||
} | ||
|
||
override fun getName(): String { | ||
return "america" | ||
} | ||
} |
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,30 @@ | ||
package me.srikavin.fbla.game.award | ||
|
||
import com.badlogic.gdx.assets.AssetManager | ||
import com.badlogic.gdx.graphics.Texture | ||
import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable | ||
import me.srikavin.fbla.game.state.GameRules | ||
|
||
abstract class Award { | ||
private lateinit var texture: Texture | ||
private lateinit var drawable: TextureRegionDrawable | ||
|
||
abstract fun apply(gameRules: GameRules) | ||
|
||
protected abstract fun getName(): String | ||
|
||
fun loadDrawable(assetManager: AssetManager) { | ||
val path = "assets/graphics/awards/${getName()}.png" | ||
assetManager.load(path, Texture::class.java) | ||
texture = assetManager.finishLoadingAsset(path) | ||
drawable = TextureRegionDrawable(texture) | ||
} | ||
|
||
fun getTexture(): Texture { | ||
return texture | ||
} | ||
|
||
fun getDrawable(): TextureRegionDrawable { | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package me.srikavin.fbla.game.award | ||
|
||
import com.badlogic.gdx.assets.AssetManager | ||
|
||
object Awards { | ||
val future: Future = Future() | ||
val business: Business = Business() | ||
val leader: Leader = Leader() | ||
val america: America = America() | ||
|
||
private val nameMap = mapOf( | ||
"future" to future, | ||
"business" to business, | ||
"leader" to leader, | ||
"america" to america | ||
) | ||
|
||
fun init(assetManager: AssetManager) { | ||
future.loadDrawable(assetManager) | ||
business.loadDrawable(assetManager) | ||
leader.loadDrawable(assetManager) | ||
america.loadDrawable(assetManager) | ||
} | ||
|
||
fun getAward(name: String): Award { | ||
return nameMap.getValue(name) | ||
} | ||
} |
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,13 @@ | ||
package me.srikavin.fbla.game.award | ||
|
||
import me.srikavin.fbla.game.state.GameRules | ||
|
||
class Business : Award() { | ||
override fun apply(gameRules: GameRules) { | ||
gameRules.coinMultiplier = 2 | ||
} | ||
|
||
override fun getName(): String { | ||
return "business" | ||
} | ||
} |
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,13 @@ | ||
package me.srikavin.fbla.game.award | ||
|
||
import me.srikavin.fbla.game.state.GameRules | ||
|
||
class Future : Award() { | ||
override fun apply(gameRules: GameRules) { | ||
gameRules.livesGainedPerLevel = 1 | ||
} | ||
|
||
override fun getName(): String { | ||
return "future" | ||
} | ||
} |
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,13 @@ | ||
package me.srikavin.fbla.game.award | ||
|
||
import me.srikavin.fbla.game.state.GameRules | ||
|
||
class Leader : Award() { | ||
override fun apply(gameRules: GameRules) { | ||
gameRules.enemiesToGold = true | ||
} | ||
|
||
override fun getName(): String { | ||
return "leader" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package me.srikavin.fbla.game.ecs.component | ||
|
||
import com.artemis.Component | ||
|
||
class Dead : Component() { | ||
var respawnRunnable: () -> Unit = {} | ||
} |
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.