Make anti-clockwise what were clockwise shapes, cleanup flash module-ing
This commit is contained in:
+30
-1
@@ -23,7 +23,6 @@ import Dodge.LightSource
|
||||
import Dodge.Projectile.Create
|
||||
import Dodge.SoundLogic
|
||||
import Dodge.Tesla.Arc
|
||||
import Dodge.WorldEvent.Flash
|
||||
import Geometry
|
||||
import LensHelp
|
||||
import ListHelp
|
||||
@@ -162,6 +161,36 @@ makeMuzzleFlare mz itmtree cr = case mz ^. mzFlareType of
|
||||
pos = _crPos cr + rotateV (_crDir cr) (_mzPos mz + aimingWeaponZeroPos cr itm)
|
||||
dir = _crDir cr + _mzRot mz
|
||||
|
||||
muzFlareAt :: Color -> Point3 -> Float -> World -> World
|
||||
muzFlareAt col tranv dir w =
|
||||
w & randGen .~ g
|
||||
& cWorld . lWorld . flares
|
||||
.:~ MuzFlare
|
||||
{ _flarePoly =
|
||||
map
|
||||
(rotateV dir)
|
||||
[ V2 0 0
|
||||
, V2 a (- b)
|
||||
, V2 c d
|
||||
]
|
||||
, _flareColor = col
|
||||
, _flareTran3 = tranv
|
||||
, _flareTime = 2
|
||||
}
|
||||
where
|
||||
thestate = replicateM 4 $ state $ randomR (2,20)
|
||||
(a : b : c : d : _, g) = runState thestate $ _randGen w -- randomRs (2, 20) (_randGen w)
|
||||
|
||||
flareCircleAt :: Color -> Float -> Point3 -> World -> World
|
||||
flareCircleAt col alphax tranv =
|
||||
cWorld . lWorld . flares
|
||||
.:~ CircFlare
|
||||
{ _flareTime = 2
|
||||
, _flareColor = col
|
||||
, _flareAlpha = alphax
|
||||
, _flareTran3 = tranv
|
||||
}
|
||||
|
||||
getLaserPhaseV :: LabelDoubleTree ComposeLinkType Item -> Float
|
||||
getLaserPhaseV = const 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user