allow player to have a different width/height that is not a perfect square, (now we have Constants.playerWidth and Constants.playerHeight, having deleted the previous size in Constants.playerSize)

This commit is contained in:
2025-02-18 12:31:22 +00:00
parent e62493ce56
commit d3200745d0
7 changed files with 270 additions and 88 deletions

View File

@@ -60,10 +60,10 @@ struct
MAIN_ATTACKING {length, ...} =>
let
open EntityType
val height = Constants.playerSize
val height = Constants.playerHeight
val x =
(case facing of
FACING_RIGHT => x + Constants.playerSize
FACING_RIGHT => x + Constants.playerWidth
| FACING_LEFT => x - length)
val (defeatedList, enemyMap) = PlayerAttackEnemy.foldRegion