Refactor crPos to be a V3
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
module Dodge.Material.Damage (damMatSideEffect) where
|
||||
|
||||
import Linear
|
||||
import Control.Lens
|
||||
import Dodge.Data.World
|
||||
import Dodge.SoundLogic
|
||||
@@ -45,7 +46,7 @@ damageStone dm ecw w =
|
||||
where
|
||||
v = case ecw of
|
||||
Right wl -> uncurry (-) $ _wlLine wl
|
||||
Left cr -> vNormal (p - _crPos cr)
|
||||
Left cr -> vNormal (p - cr ^. crPos . _xy)
|
||||
randsound p xs =
|
||||
let (x, g) = runState (takeOne xs) $ _randGen w
|
||||
in soundStart so p x Nothing . set randGen g
|
||||
@@ -76,7 +77,7 @@ damageMetal dm ecw w =
|
||||
where
|
||||
v = case ecw of
|
||||
Right wl -> uncurry (-) $ _wlLine wl
|
||||
Left cr -> vNormal (p - _crPos cr)
|
||||
Left cr -> vNormal (p - cr ^. crPos . _xy)
|
||||
outTo x t = x -.- squashNormalizeV t
|
||||
randsound p xs =
|
||||
let (x, g) = runState (takeOne xs) $ _randGen w
|
||||
|
||||
Reference in New Issue
Block a user