Beef up minigun
This commit is contained in:
@@ -5,6 +5,6 @@ import Dodge.Data
|
||||
import Picture
|
||||
|
||||
drawBul :: Particle -> Picture
|
||||
drawBul pt = setLayer 1 . setDepth 20 . color thecolor $ thickLine (take 2 $ _btTrail' pt) (_btWidth' pt)
|
||||
drawBul pt = setLayer 1 . setDepth 20 . color thecolor $ thickLine (take 3 $ _btTrail' pt) (_btWidth' pt)
|
||||
where
|
||||
thecolor = _btColor' pt
|
||||
|
||||
@@ -7,6 +7,7 @@ import Geometry
|
||||
import Picture
|
||||
|
||||
import Control.Lens
|
||||
import Data.Bifunctor
|
||||
|
||||
aGenBulAt
|
||||
:: Maybe Int -- ^ Pass-through creature id
|
||||
@@ -26,6 +27,27 @@ aGenBulAt maycid pos vel hiteff width = Bul'
|
||||
, _btTimer' = 100
|
||||
, _btHitEffect' = hiteff
|
||||
}
|
||||
aDelayedBulAt
|
||||
:: Float -- ^ Start velocity step factor
|
||||
-> Maybe Int -- ^ Pass-through creature id
|
||||
-> Point2 -- ^ Start position
|
||||
-> Point2 -- ^ Velocity
|
||||
-> HitEffect
|
||||
-> Float -- ^ Bullet width
|
||||
-> Particle
|
||||
aDelayedBulAt vfact maycid pos vel hiteff width = Bul'
|
||||
{ _ptDraw = drawBul
|
||||
, _ptUpdate' = \w -> resetVel . mvGenBullet w
|
||||
, _btVel' = vfact *.* vel
|
||||
, _btColor' = V4 2 2 2 2
|
||||
, _btTrail' = [pos]
|
||||
, _btPassThrough' = maycid
|
||||
, _btWidth' = width
|
||||
, _btTimer' = 100
|
||||
, _btHitEffect' = hiteff
|
||||
}
|
||||
where
|
||||
resetVel = second $ fmap $ (ptUpdate' .~ mvGenBullet) . (btVel' .~ vel)
|
||||
|
||||
aCurveBulAt
|
||||
:: Maybe Int -- ^ Pass-through creature id
|
||||
|
||||
Reference in New Issue
Block a user