Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
Fully Automatic Spawning Class? — Gideros Forum

Fully Automatic Spawning Class?

HarrisonHarrison Member
edited April 2014 in General questions
I feel that the main thing holding me back is that i cannot understand how to program a class so that all i have to do to make.. for example, squares. I want to be able to call something like makesquare() and than it will autospawn a square in a random spot that in 10 seconds, deletes itself. Like balls2 example but fully automatic so i can eventually code only 1 monster and it will be able to make 400 without this:
local ball1 = Ball.new("ball1.png")
local ball2 = Ball.new("ball2.png")
local ball3 = Ball.new("ball3.png")
local ball4 = Ball.new("ball4.png")
stage:addChild(ball1)
stage:addChild(ball2)
stage:addChild(ball3)
stage:addChild(ball4)
*100
any help would be greatly appreciated because when i understand this, i might have a shot at making things like paratroopers, minesweeper, and etec. :D
(If you are confused by this ^ just ask for clarification. I understand that sometimes i get confusing.)
“ The first 90% of the code accounts for the first 90% of the development time. The remaining 10% of the code accounts for the other 90% of the development time. ” - Tom Cargill

Comments

Sign In or Register to comment.