different colours for different enemies so they are easier to differentiate

This commit is contained in:
2025-02-15 12:18:08 +00:00
parent 491ad11c4c
commit 190f11d7ef
3 changed files with 17 additions and 6 deletions

View File

@@ -76,9 +76,16 @@ struct
fun helpGetDrawVec (enemy: EnemyType.enemy, width, height) =
let
val {x, y, ...} = enemy
val {x, y, variant, ...} = enemy
val wratio = width / Constants.worldWidthReal
val hratio = height / Constants.worldHeightReal
open EnemyType
val (r, g, b) =
case variant of
PATROL_SLIME => (0.5, 0.5, 1.0)
| FOLLOW_SLIME => (1.0, 0.5, 0.5)
| STRAIGHT_BAT => (0.55, 0.55, 0.55)
in
if wratio < hratio then
let
@@ -93,8 +100,7 @@ struct
val realSize = Constants.enemySizeReal * wratio
in
Block.lerp
(x, y, realSize, realSize, width, height, 0.5, 0.5, 1.0)
Block.lerp (x, y, realSize, realSize, width, height, r, g, b)
end
else
let
@@ -109,8 +115,7 @@ struct
val realSize = Constants.enemySizeReal * hratio
in
Block.lerp
(x, y, realSize, realSize, width, height, 0.5, 0.5, 1.0)
Block.lerp (x, y, realSize, realSize, width, height, r, g, b)
end
end