DEADSOFTWARE

Add player health
[cavedroid.git] / core / src / ru / deadsoftware / cavedroid / game / mobs / Pig.kt
index a9295464e43cd7c0b03d5c9a9f2a54077f022815..4f9d5fcef6caa2d48dd59cb8cdb291696a8c55f8 100644 (file)
@@ -12,7 +12,7 @@ import ru.deadsoftware.cavedroid.misc.utils.mobs.MobSprites.Pig.getLeftLegRelati
 import ru.deadsoftware.cavedroid.misc.utils.mobs.MobSprites.Pig.getLegsRelativeY
 import ru.deadsoftware.cavedroid.misc.utils.mobs.MobSprites.Pig.getRightLegRelativeX
 
-class Pig(x: Float, y: Float) : Mob(x, y, WIDTH, HEIGHT, randomDir(), Type.MOB) {
+class Pig(x: Float, y: Float) : Mob(x, y, WIDTH, HEIGHT, randomDir(), Type.MOB, MAX_HEALTH) {
 
     override fun getSpeed(): Float {
         return SPEED
@@ -57,5 +57,6 @@ class Pig(x: Float, y: Float) : Mob(x, y, WIDTH, HEIGHT, randomDir(), Type.MOB)
         private const val HEIGHT = 18f
         private const val SPEED =  69.072f
         private const val JUMP_VELOCITY = -133.332f
+        private const val MAX_HEALTH = 10;
     }
 }
\ No newline at end of file