Add shaders that will just return positional information

This commit is contained in:
2021-08-31 18:32:50 +01:00
parent f58530cbb1
commit 146bab6fe3
18 changed files with 336 additions and 2 deletions
+8
View File
@@ -19,6 +19,7 @@ module Dodge.Item.Weapon.TriggerType
, withRandomOffsetI
, withRandomDirI
, withRecoilI
, afterRecoil
, withSidePushAfterI
, withSidePushI
, withWarmUpI
@@ -153,6 +154,13 @@ withSoundForI soundid playTime f item cr
= soundFromPos (CrWeaponSound (_crID cr)) (_crPos cr) soundid playTime 0
. f item cr
afterRecoil
:: Float -- ^ Recoil amount
-> ChainEffect
afterRecoil recoilAmount eff item cr = eff item (pushback cr) . over (creatures . ix cid) pushback
where
cid = _crID cr
pushback = over crPos (+.+ rotateV (_crDir cr) (V2 ((-recoilAmount) / _crMass cr ) 0))
withRecoilI
:: Float -- ^ Recoil amount
-> ChainEffect