constant rocket plume
This commit is contained in:
parent
7eee00d7ea
commit
e2f02985d3
2 changed files with 28 additions and 1 deletions
|
|
@ -94,6 +94,22 @@ function actors.buildActors(game)
|
|||
instance.engineSound = love.audio.newSource(instance.engineSound)
|
||||
instance.engineSound:setVolume(0)
|
||||
instance.engineSound:setLooping(true)
|
||||
instance.rocketPlume = love.graphics.newParticleSystem(instance.rocketPlume)
|
||||
instance.rocketPlume:setColors(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
|
||||
instance.rocketPlume:setSizes(1.0, 0.9, 0.1)
|
||||
instance.rocketPlume:setEmissionRate(1000)
|
||||
-- TODO probably governed most by thrust
|
||||
instance.rocketPlume:setParticleLifetime(0.1, 0.25)
|
||||
instance.rocketPlume:setEmissionArea('normal', 10, 10)
|
||||
instance.rocketPlume:setSpeed(150, 300)
|
||||
instance.rocketPlume:setRadialAcceleration(40, 80)
|
||||
instance.rocketPlume:setLinearDamping(0, 0)
|
||||
instance.rocketPlume:setDirection(phys.tau * 3 / 4)
|
||||
instance.rocketPlume:setSpread(0)
|
||||
instance.rocketPlume:setSizeVariation(0)
|
||||
instance.rocketPlume:setSpin(0.5, 1)
|
||||
instance.rocketPlume:setTangentialAcceleration(0, 0)
|
||||
|
||||
setmetatable(instance, ships_mt)
|
||||
return instance
|
||||
end
|
||||
|
|
@ -115,7 +131,16 @@ function actors.buildActors(game)
|
|||
width / 2,
|
||||
height / 2
|
||||
)
|
||||
-- TODO rocket exhaust
|
||||
--self.rocketPlume:setDirection(phys.tau * 3 / 4)
|
||||
love.graphics.draw(self.rocketPlume,
|
||||
0,
|
||||
0,
|
||||
(self.facing + phys.tau * 3 / 4) % phys.tau,
|
||||
scale,
|
||||
scale,
|
||||
0,
|
||||
height * 0.75
|
||||
)
|
||||
love.graphics.pop()
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue