Clarify number of distortions, play with distorting bullets
This commit is contained in:
+11
-1
@@ -154,7 +154,17 @@ makeFlak bu _ w = w & cWorld . lWorld . bullets .++~ [f x | x <- xs]
|
||||
g x v = v +.+ x *.* normalizeV (vNormal v)
|
||||
|
||||
hitEffFromBul :: World -> Bullet -> (World, Bullet)
|
||||
hitEffFromBul w bu = case _buEffect bu of
|
||||
hitEffFromBul w bu = hitEffFromBul' w' bu
|
||||
where
|
||||
w' = w & cWorld . lWorld . distortions .:~ x
|
||||
x = RadialDistortion (_buPos bu + _buVel bu) (V2 50 0) (V2 0 50)
|
||||
(v3 & _3 .~ t) (v3 & _3 .~ negate t) v3 1
|
||||
v3 = V3 (V2 1 0) (V2 0 1) 0
|
||||
t = vNormal (_buVel bu)
|
||||
-- (V2 1 0) (V2
|
||||
|
||||
hitEffFromBul' :: World -> Bullet -> (World, Bullet)
|
||||
hitEffFromBul' w bu = case _buEffect bu of
|
||||
PenetrateBullet -> movePenBullet bu hitstream w
|
||||
BounceBullet -> fromMaybe (expireAndDamage bu hitstream w) $ do
|
||||
(hp, crwl) <- hitstream ^? _head
|
||||
|
||||
Reference in New Issue
Block a user