This has been bugging me for a long time… The score system, making my ball bigger, making my walls close in on me, etc! I’ve got a variable that determines the size of my ball, but how can I change this variable throughout the game?
local ball = display.newImage("Images/Ball.png", xpos, ypos)
local ballSize = 8
-- Scale
ball.yScale = ballSize/125
ball.xScale = ballSize/125
local function onCollisionBall(self, event)
if (event.phase == "began" and event.other.class == "enemy") then
-- Remove enemy
event.other:removeSelf()
-- Get bigger
ballSize = ballSize + 1
return true
end
end
This is my current code…
Thanks in advance, [import]uid: 14018 topic_id: 5403 reply_id: 305403[/import]