Move scroll smoothing to central location
This commit is contained in:
@@ -71,7 +71,7 @@ sniperRifle =
|
||||
& itParams . gunBarrels .~ SingleBarrel 0
|
||||
& itUse . heldAim . aimZoom .~ defaultItZoom{_izMax = 0.5, _izMin = 0.5,_izFac = 1}
|
||||
& itUse . heldScroll .~ HeldScrollZoom -- zoomLongGun
|
||||
& itScope .~ ZoomScope (V2 0 0) 0 1 0.5 False
|
||||
& itScope .~ ZoomScope (V2 0 0) 1 0.5 False
|
||||
& itUse . useTargeting ?~ TargetLaser
|
||||
|
||||
machineGun :: Item
|
||||
|
||||
@@ -32,7 +32,7 @@ latchkey _ =
|
||||
binoculars :: Item
|
||||
binoculars =
|
||||
defaultHeldItem
|
||||
& itScope .~ ZoomScope (V2 0 0) 0 1 0.5 False
|
||||
& itScope .~ ZoomScope (V2 0 0) 1 0.5 False
|
||||
& itType . iyBase .~ HELD BINOCULARS
|
||||
& itUse . heldAim . aimHandlePos .~ 5
|
||||
& itUse . heldAim . aimMuzPos .~ 10
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
module Dodge.Item.Weapon.ZoomScope where
|
||||
|
||||
import Dodge.Data.Item
|
||||
import LensHelp
|
||||
-- should be possible without the creature
|
||||
|
||||
setZoomScopeChange :: Float -> Item -> Item
|
||||
setZoomScopeChange x
|
||||
| x > 0 = itScope . scopeZoomChange %~ (max 0 . (+ xi))
|
||||
| x < 0 = itScope . scopeZoomChange %~ (min 0 . (+ xi))
|
||||
| otherwise = id
|
||||
where
|
||||
xi | x > 2 = 20
|
||||
| x > 1 = 10
|
||||
| x > 0 = 1
|
||||
| x < -2 = - 20
|
||||
| x < -1 = - 10
|
||||
| x < -0 = - 1
|
||||
| otherwise = 0
|
||||
Reference in New Issue
Block a user