GetReleaseQuantity

This function returns whether or not the emitter is paused or playing.

Syntax

Returns

This function returns the number of particles released at each interval.

Example

--Create a window
window = Window:Create()
context = Context:Create(window)
world = World:Create()
camera = Camera:Create()
camera:Move(0,0,-3)

local releasequantity = 10

--Create an semitter
emitter = Emitter:Create(50)
emitter:SetReleaseQuantity(releasequantity)

while true do
if window:Closed() or window:KeyHit(Key.Escape) then return false end

Time:Update()
world:Update()
world:Render()

if(window:KeyDown(Key.Up) and releasequantity < 50) then
releasequantity = releasequantity +1
emitter:SetReleaseQuantity(releasequantity)
elseif (window:KeyDown(Key.Down) and releasequantity > 1) then
releasequantity = releasequantity -1
emitter:SetReleaseQuantity(releasequantity)
end

context:SetBlendMode(Blend.Alpha)
context:DrawText("Release Quantity: " ..emitter:GetReleaseQuantity() ,2,2)

context:Sync()
end