Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat
Quick and easy starfield... - Gideros Forum

Quick and easy starfield...

SinisterSoftSinisterSoft Maintainer
edited June 2016 in Step by step tutorials
Using the new particles system...
w=application:getContentWidth()
h=application:getContentHeight()
application:setBackgroundColor(0)
 
stars=Particles.new()
stars:setPosition(w/2,h/2)
stage:addChild(stars)
 
function gameLoop(e)
	stars:addParticles({{x=0,y=0,size=5,ttl=200,speedX=math.random()-0.5,speedY=math.random()-0.5,decay=1.04}})
end
 
stage:addEventListener(Event.ENTER_FRAME,gameLoop)
http://giderosmobile.com/examples#Graphics/ParticlesStars

Makes:
2016-06-19_17-59-46.png
1275 x 760 - 15K
+1 -1 (+6 / -0 ) Share on Facebook

Comments

Sign In or Register to comment.