Refactor projectiles
This commit is contained in:
@@ -2,13 +2,13 @@ module Dodge.Default.Prop where
|
||||
import Dodge.Data
|
||||
import Geometry
|
||||
defaultProp :: Prop
|
||||
defaultProp = Projectile
|
||||
defaultProp = ShapeProp
|
||||
{ _prPos = V2 0 0
|
||||
, _pjStartPos = V2 0 0
|
||||
, _pjVel = V2 0 0
|
||||
, _prDraw = const mempty
|
||||
, _pjID = 0
|
||||
, _pjUpdate = const id
|
||||
, _prToggle = True
|
||||
, _pjRot = 0
|
||||
}
|
||||
defaultShapeProp :: Prop
|
||||
defaultShapeProp = ShapeProp
|
||||
|
||||
+13
-14
@@ -1,21 +1,20 @@
|
||||
module Dodge.Default.Shell
|
||||
where
|
||||
import Dodge.Data
|
||||
import Picture
|
||||
import Geometry.Data
|
||||
|
||||
defaultShell :: Prop
|
||||
defaultShell :: Proj
|
||||
defaultShell = Shell
|
||||
{ _prPos = V2 0 0
|
||||
, _pjZ = 20
|
||||
, _pjStartPos = V2 0 0
|
||||
, _pjVel = V2 0 0
|
||||
, _pjAcc = V2 0 0
|
||||
, _pjDir = 0
|
||||
, _pjSpin = 0
|
||||
, _prDraw = const (mempty, blank)
|
||||
, _pjID = 0
|
||||
, _pjTimer = 0
|
||||
, _pjUpdate = const id
|
||||
, _pjPayload = const id
|
||||
{ _prjPos = V2 0 0
|
||||
, _prjZ = 20
|
||||
, _prjStartPos = V2 0 0
|
||||
, _prjVel = V2 0 0
|
||||
, _prjAcc = V2 0 0
|
||||
, _prjDir = 0
|
||||
, _prjSpin = 0
|
||||
, _prjDraw = DrawShell
|
||||
, _prjID = 0
|
||||
, _prjTimer = 0
|
||||
, _prjUpdate = const id
|
||||
, _prjPayload = ExplosionPayload
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ defaultWorld = World
|
||||
, _gsZoning = Zoning IM.empty clZoneSize (zonePos _guPos)
|
||||
, _itemPositions = IM.empty
|
||||
, _props = IM.empty
|
||||
, _projectiles = IM.empty
|
||||
, _instantBullets = []
|
||||
, _bullets = []
|
||||
, _instantParticles = []
|
||||
|
||||
Reference in New Issue
Block a user