i building air hockey game and it’s going to finish
i have only cpu move problem for move on Y
i make cpu move X this way :
function cpumove()
if ball.x > cpuplayer.x then
cpuplayer.x = cpuplayer.x + speed
elseif ball.x < cpuplayer.x then
cpuplayer.x = cpuplayer.x - speed
end
end
Runtime:addEventListener(“enterFrame”, cpumove)
what can i do for Y move cpu?
thank u guys