HELP!
Posted: Sun Apr 15, 2012 2:23 pm
I'm working on a game, really really reaaaaally simple. It's called "Followers"
and you control a mouse and every third second a new red dot appear on the
screen. If you touch a red dot, you lose. Every second counts as one point,
but my problem is, I don't know how to make a start menu, cause if I write:
function love.load()
screenMenu = love.graphics.newImage("graphics/screens/menu.png")
screenPlay = love.graphics.newImage("graphics/screens/play.png")
buttonStart = love.graphics.newImage("graphics/buttons/start.png")
screen = menu
end
function love.update()
end
function love.draw()
if screen == menu then
love.graphics.draw(screenMenu, 0, 0)
else love.graphics.clear(screenMenu)
end
if screen == play then
love.graphics.draw(screenPlay, 0, 0)
else love.graphics.clear(screenPlay)
end
if screen == menu then
love.graphics.draw(buttonStart, 400, 300)
else love.graphics.clear(buttonStart)
end
end
my game screen is white (because screenPlay is white) and whatever I do, it remains
white! HELP!
and you control a mouse and every third second a new red dot appear on the
screen. If you touch a red dot, you lose. Every second counts as one point,
but my problem is, I don't know how to make a start menu, cause if I write:
function love.load()
screenMenu = love.graphics.newImage("graphics/screens/menu.png")
screenPlay = love.graphics.newImage("graphics/screens/play.png")
buttonStart = love.graphics.newImage("graphics/buttons/start.png")
screen = menu
end
function love.update()
end
function love.draw()
if screen == menu then
love.graphics.draw(screenMenu, 0, 0)
else love.graphics.clear(screenMenu)
end
if screen == play then
love.graphics.draw(screenPlay, 0, 0)
else love.graphics.clear(screenPlay)
end
if screen == menu then
love.graphics.draw(buttonStart, 400, 300)
else love.graphics.clear(buttonStart)
end
end
my game screen is white (because screenPlay is white) and whatever I do, it remains
white! HELP!