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:
@@ -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) =
|
||||
|
||||
Reference in New Issue
Block a user