Add shaders that will just return positional information
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user