This function gets the particle's initial or final color.
This function returns a vector 4 containing the color values: red, green, blue, alpha.
--Create a window
window = Window:Create()
context = Context:Create(window)
world = World:Create()
camera = Camera:Create()
camera:Move(0,0,-3)
--Create an semitter
emitter = Emitter:Create(50)
emitter:SetParticleColor(1,0,0,1,0) --inital color: red
emitter:SetParticleColor(0,1,0,1,1) --final color: green
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)
context:DrawText("Initial Color: " .. emitter:GetParticleColor(0).r .. " , " .. emitter:GetParticleColor(0).g .." , " .. emitter:GetParticleColor(0).b ,2,2)
context:DrawText("Final Color: " .. emitter:GetParticleColor(1).r .. " , " .. emitter:GetParticleColor(1).g .." , " .. emitter:GetParticleColor(1).b ,2,22)
context:Sync()
end