Initial implementation of bezier bullet
This commit is contained in:
@@ -231,6 +231,22 @@ aGenBulAt' maycid col pos vel hiteff width = Bul'
|
||||
, _btTrail' = [pos]
|
||||
, _btPassThrough' = maycid
|
||||
, _btWidth' = width
|
||||
, _btTimer' = 90
|
||||
, _btTimer' = 100
|
||||
, _btHitEffect' = hiteff
|
||||
}
|
||||
|
||||
aCurveBulAt :: Maybe Int -> Color -> Point2 -> Point2 -> Point2 -> HitEffect' -> Float -> Particle'
|
||||
aCurveBulAt maycid col pos control targ hiteff width = Bul'
|
||||
{ _ptPict' = blank
|
||||
, _ptUpdate' = mvBulletTrajectory f
|
||||
, _btVel' = (0,0)
|
||||
, _btColor' = col
|
||||
, _btTrail' = [pos]
|
||||
, _btPassThrough' = maycid
|
||||
, _btWidth' = width
|
||||
, _btTimer' = 100
|
||||
, _btHitEffect' = hiteff
|
||||
}
|
||||
where f i = g $ (100 - fromIntegral i) / 10
|
||||
g x = map (bf . (+ x)) [0,0.01..0.09]
|
||||
bf = bQuadToF (pos,control,targ)
|
||||
|
||||
Reference in New Issue
Block a user