Refactor crPos to be a V3

This commit is contained in:
2025-10-10 13:47:31 +01:00
parent 98ece551c7
commit 49fb982877
58 changed files with 375 additions and 307 deletions
+4 -1
View File
@@ -1,5 +1,7 @@
module Dodge.PressPlate where
import Control.Lens
import Linear
import Dodge.Base.You
import Dodge.Data.World
import Dodge.WorldEvent.Explosion
@@ -12,5 +14,6 @@ doPressPlateEvent ppe = case ppe of
ppLevelReset :: PressPlate -> World -> World
ppLevelReset pp w
| dist (_crPos $ you w) (_ppPos pp) < 20 = makeExplosionAt (_ppPos pp `v2z` 20) 0 w
| dist (you w ^. crPos . _xy) (_ppPos pp) < 20
= makeExplosionAt (_ppPos pp `v2z` 20) 0 w
| otherwise = w