Fix direction stuttering bug

This commit is contained in:
2021-09-22 19:42:39 +01:00
parent 0295b3dd70
commit 7b6904b51f
10 changed files with 59 additions and 93 deletions
+8 -7
View File
@@ -14,14 +14,12 @@ import Dodge.Particle.Bullet.Spawn
import Dodge.Particle.Bullet.HitEffect
import Dodge.WorldEvent.HitEffect
import Dodge.RandomHelp
import Dodge.Picture.Layer
import Dodge.SoundLogic.LoadSound
import Picture
import Geometry
--import ShapePicture
import ShapePicture
import Shape
--import System.Random
import Data.Maybe
import Control.Lens
import Control.Monad.State
@@ -37,8 +35,8 @@ bezierGun = defaultGun
. withRecoilI 40
. torqueBefore 0.05
]
, _itFloorPict = (,) emptySH $ onLayer FlItLayer bezierGunPic
, _itEquipPict = pictureWeaponOnAim $ (,) emptySH bezierGunPic
, _itFloorPict = bezierGunSPic
, _itEquipPict = pictureWeaponOnAim bezierGunSPic
, _itAttachment = NoItAttachment
, _itScroll = \_ _ -> removeItTarget
, _itHammer = HammerUp
@@ -49,8 +47,11 @@ bezierGun = defaultGun
, _itUseRate = 6
, _itAimStance = TwoHandTwist
}
bezierGunPic :: Picture
bezierGunPic = color red $ polygon $ rectNESW 4 12 (-4) (-12)
bezierGunSPic :: SPic
bezierGunSPic =
( colorSH red $ upperPrismPoly 5 $ rectNESW 4 12 (-4) (-12)
, mempty
)
shootBezier :: Point2 -> Creature -> World -> World
shootBezier targetp cr w = w & particles %~ (theBullet :)