Start making projectile update function rather than folded list
This commit is contained in:
@@ -32,24 +32,26 @@ createShell mdetonator mscreen pjtype payload muz cr w = w
|
||||
, _pjPayload = payload
|
||||
, _pjTimer = lifespan
|
||||
, _pjUpdates =
|
||||
[ CollisionEffectPU mdetonator mscreen
|
||||
[ CollisionEffectPU
|
||||
, TimePU
|
||||
, StartSpinPU (lifespan - 15) (_crID cr) spinamount
|
||||
, RemoteDirectionPU (lifespan - thrustdelay) 0
|
||||
, ReduceSpinPU (1 - spindrag * 2 / 200)
|
||||
] <> thrustorgrav
|
||||
, _pjType = pjtype
|
||||
, _pjDetonatorID = mdetonator
|
||||
, _pjScreenID = mscreen
|
||||
}
|
||||
where
|
||||
speed = case pjtype of
|
||||
Grenade -> 4
|
||||
Grenade {} -> 4
|
||||
Rocket{} -> 1
|
||||
lifespan = case pjtype of
|
||||
Grenade -> 150
|
||||
Rocket{} -> 350
|
||||
RetiredProjectile -> 0
|
||||
lifespan = 350
|
||||
thrustorgrav = case pjtype of
|
||||
Grenade -> [ApplyGravityPU]
|
||||
Grenade {}-> [ApplyGravityPU]
|
||||
Rocket{} -> [ThrustPU (lifespan - thrustdelay) 0]
|
||||
RetiredProjectile -> []
|
||||
spindrag = 1
|
||||
spinamount = 2
|
||||
thrustdelay = 20
|
||||
|
||||
Reference in New Issue
Block a user