initial implementation of bat's update function (todo: make bat oscillate up and down while it also moves in x axis, and also code bat's collisions with player, adding to falling list if necessary, or being filtered by player's attack)

This commit is contained in:
2025-02-11 19:38:02 +00:00
parent 3202c67f47
commit d0d93780fb
4 changed files with 77 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ sig
| W_Y_AXIS of GameType.y_axis
| W_PLAT_ID of int
| W_NEXT_PLAT_ID of int
| W_BAT_REST of int
val withPatch: GameType.enemy * enemy_patch -> GameType.enemy
@@ -24,6 +25,7 @@ struct
| W_Y_AXIS of GameType.y_axis
| W_PLAT_ID of int
| W_NEXT_PLAT_ID of int
| W_BAT_REST of int
fun mkEnemy
(id, health, x, y, xAxis, yAxis, variant, platID, nextPlatID, batRest) =
@@ -136,6 +138,19 @@ struct
, nextPlatID
, batRest
)
| W_BAT_REST batRest =>
mkEnemy
( id
, health
, x
, y
, xAxis
, yAxis
, variant
, platID
, nextPlatID
, batRest
)
end
fun withPatches (enemy, lst) =