GetLoopMode

This function returns whether or not the emitter will loop.

Syntax

Returns

This function returns a boolean value that, if true the particle effect will loop. If false, the effect will only play for one duration.

Example

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

--Create an emitter
emitter = Emitter:Create(10)
emitter:SetLoopMode(false)

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

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

context:SetBlendMode(Blend.Alpha)
if(emitter:GetLoopMode())then
context:DrawText("Particles will loop.",2,2);
else
context:DrawText("Particles will not loop.",2,2);
end

context:Sync()
end