Move flares into own grouping
This commit is contained in:
@@ -16,7 +16,6 @@ module Dodge.WorldEvent.Flash
|
||||
) where
|
||||
import Dodge.Data
|
||||
import Dodge.LightSource
|
||||
import Dodge.WorldEvent.HelperParticle
|
||||
--import Dodge.Default
|
||||
import Picture
|
||||
import Geometry
|
||||
@@ -25,25 +24,25 @@ import LensHelp
|
||||
import System.Random
|
||||
|
||||
muzFlareAt :: Color -> Point3 -> Float -> World -> World
|
||||
muzFlareAt col tranv dir w = w & instantParticles .:~ PtMuzFlare
|
||||
{ _ptUpdate = ptSimpleTime 2
|
||||
, _ptPoly = map (rotateV dir)
|
||||
muzFlareAt col tranv dir w = w & flares .:~ MuzFlare
|
||||
{ _flarePoly = map (rotateV dir)
|
||||
[ V2 0 0
|
||||
, V2 a (-b)
|
||||
, V2 c d
|
||||
]
|
||||
, _ptColor = col
|
||||
, _ptTran3 = tranv
|
||||
, _flareColor = col
|
||||
, _flareTran3 = tranv
|
||||
, _flareTime = 2
|
||||
}
|
||||
where
|
||||
(a:b:c:d:_) = randomRs (2,20) (_randGen w)
|
||||
|
||||
flareCircleAt :: Color -> Float -> Point3 -> World -> World
|
||||
flareCircleAt col alphax tranv = instantParticles .:~ PtCircFlare
|
||||
{ _ptUpdate = ptSimpleTime 1
|
||||
, _ptColor = col
|
||||
, _ptAlpha = alphax
|
||||
, _ptTran3 = tranv
|
||||
flareCircleAt col alphax tranv = flares .:~ CircFlare
|
||||
{ _flareTime = 2
|
||||
, _flareColor = col
|
||||
, _flareAlpha = alphax
|
||||
, _flareTran3 = tranv
|
||||
}
|
||||
|
||||
explosionFlashAt :: Point2 -> World -> World
|
||||
|
||||
Reference in New Issue
Block a user