diff --git a/app/src/main/java/com/matthiaslapierre/spaceshooter/Constants.kt b/app/src/main/java/com/matthiaslapierre/spaceshooter/Constants.kt index f69eb7b..8e0536f 100644 --- a/app/src/main/java/com/matthiaslapierre/spaceshooter/Constants.kt +++ b/app/src/main/java/com/matthiaslapierre/spaceshooter/Constants.kt @@ -91,7 +91,7 @@ object Constants { const val INITIAL_DELAY_BEFORE_ADDING_ENEMY_SHIP_IN_SECONDS = 5L /** - * Draw change to win the "Space ship upgrate" bonus. + * Draw change to win the "Space ship upgrade" bonus. */ const val DRAW_CHANCE_BOLT = 20 diff --git a/app/src/main/java/com/matthiaslapierre/spaceshooter/resources/Drawables.kt b/app/src/main/java/com/matthiaslapierre/spaceshooter/resources/Drawables.kt index 77edb1d..b18f6c0 100644 --- a/app/src/main/java/com/matthiaslapierre/spaceshooter/resources/Drawables.kt +++ b/app/src/main/java/com/matthiaslapierre/spaceshooter/resources/Drawables.kt @@ -164,7 +164,7 @@ class Drawables( fun getExplosionFrame(frame: Int): Drawable = get("explode_$frame".hashCode()) /** - * Power-up. Space ship upgrate. + * Power-up. Space ship upgrade. */ fun getPowerUpBolt() = get(R.drawable.powerup_bolt) diff --git a/app/src/main/java/com/matthiaslapierre/spaceshooter/ui/game/GameProcessor.kt b/app/src/main/java/com/matthiaslapierre/spaceshooter/ui/game/GameProcessor.kt index 7b1f8f3..ee32b14 100644 --- a/app/src/main/java/com/matthiaslapierre/spaceshooter/ui/game/GameProcessor.kt +++ b/app/src/main/java/com/matthiaslapierre/spaceshooter/ui/game/GameProcessor.kt @@ -288,7 +288,7 @@ class GameProcessor( && !powerUp.isConsumed) { powerUp.isConsumed = true when (powerUp.type) { - PowerUpSprite.TYPE_BOLT -> player.upgrate() + PowerUpSprite.TYPE_BOLT -> player.upgrade() PowerUpSprite.TYPE_SHIELD -> player.life += (Constants.PLAYER_MAX_LIFE * 0.2f).toInt() PowerUpSprite.TYPE_STAR -> points += BONUS_POINTS else -> points += BONUS_POINTS diff --git a/app/src/main/java/com/matthiaslapierre/spaceshooter/ui/game/sprite/PlayerSprite.kt b/app/src/main/java/com/matthiaslapierre/spaceshooter/ui/game/sprite/PlayerSprite.kt index 3cca4b6..f0726db 100644 --- a/app/src/main/java/com/matthiaslapierre/spaceshooter/ui/game/sprite/PlayerSprite.kt +++ b/app/src/main/java/com/matthiaslapierre/spaceshooter/ui/game/sprite/PlayerSprite.kt @@ -121,9 +121,9 @@ class PlayerSprite( } /** - * Upgrate the space ship. + * Upgrade the space ship. */ - fun upgrate() { + fun upgrade() { type++ } diff --git a/app/src/main/java/com/matthiaslapierre/spaceshooter/ui/game/sprite/PowerUpSprite.kt b/app/src/main/java/com/matthiaslapierre/spaceshooter/ui/game/sprite/PowerUpSprite.kt index c6cb738..14147fb 100644 --- a/app/src/main/java/com/matthiaslapierre/spaceshooter/ui/game/sprite/PowerUpSprite.kt +++ b/app/src/main/java/com/matthiaslapierre/spaceshooter/ui/game/sprite/PowerUpSprite.kt @@ -23,7 +23,7 @@ class PowerUpSprite( companion object { /** - * Space ship upgrate. + * Space ship upgrade. */ const val TYPE_BOLT = 0