Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function love.draw()
- if gamestate == "menu" then
- sbutx = 200
- sbuty = 500
- love.graphics.setColor( 64, 64, 64 )
- love.graphics.rectangle( "fill", 0, 0, 999, 999 )
- love.graphics.setColor( 25, 212, 206 )
- love.graphics.print( "A game!", 0, 0, 0, 2, 2 )
- love.graphics.setColor( 159, 105, 201 )
- love.graphics.rectangle( "fill", sbutx, sbuty, 400, 50 )
- love.graphics.setColor( 0, 0, 0 )
- love.graphics.print( "start", 360, 510, 0, 2, 2 )
- end
- if gamestate == "playing" and pause == false then
- drawcircle()
- drawplayer()
- drawhp()
- drawchathist()
- if chatting == true then
- chat.drawbox()
- love.graphics.printf( text, 0, 500, 800 )
- end
- if helpmenu == true then
- drawhelp()
- drawhp()
- end
- elseif gamestate == "playing" and pause == true then
- pausegame()
- end
- if gamestate == "dead" then
- if pause == true then
- pause = false
- end
- love.graphics.setColor( 255, 0, 0 )
- love.graphics.print( "You have died!", 0, 0, 0, 2, 2 )
- love.graphics.draw( deathsymbol, 400, 300 )
- end
- end
- function love.mousepressed( x, y, button )
- mx = love.mouse.getX()
- my = love.mouse.getY()
- print ( "X: " .. mx .. " Y: " .. my )
- if button == "l" then
- if gamestate == "menu" then
- if mx >=200 and my >= 500 and mx <= 600 and my <= 550 then
- gamestate = "playing"
- end
- elseif gamestate == "playing" then
- circlecheck()
- end
- if gamestate == "playing" then
- if helpmenu == true then
- if mx >= 560 and my >= 160 and mx <= 580 and my <= 180 then
- helpmenu = false
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement