Refactor crPos to be a V3
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user