Hello,
I ran into a problem while making a game. I made a generator of circles that fire to random locations. Player will touch the circle to remove it and the goal is to get rid of them all.
The problem is that if two circles overlap they both get removed.
Can anyone help me please? I’m sure there must be some really easy solution but I starting to get kinda desperate.
[lua]local function Shoot()
local random = math.random(0,display.contentWidth)
local kruh = display.newImage(“kolecko.png”,display.contentCenterX ,100)
local function KruhListener(event)
if event.phase == “began” then
display.remove(event.target)
end
end
kruh:addEventListener( “touch”, KruhListener )
local transition = transition.to(kruh, {x = random,y = display.contentHeight, time = 4500})
end
local function GameStart()
for i=1, 10 do
Shoot()
end
end
GameStart()[/lua]