state = {} function state:enter() love.graphics.setBackgroundColor(0.9, 0.9, 0.9) end function state:draw() love.graphics.setColor(1, 1, 1) love.graphics.rectangle("fill", 93, 110, 500, 150) love.graphics.draw(Images["level22"], 687, 110) love.graphics.setColor(0, 0, 0) love.graphics.rectangle("line", 687, 110, 500, 500) love.graphics.rectangle("line", 93, 110, 500, 150) love.graphics.setFont(Font35) love.graphics.print("Mitä kerron kokemuksestani naisen\nkanssa?", 103, 117) love.graphics.setFont(Font45) love.graphics.setColor(0, 0, 0) if love.mouse.getX() > 120 and love.mouse.getX() < 600 then if love.mouse.getY() > 300 and love.mouse.getY() < 360 then love.graphics.setColor(0.6, 0.6, 0.6) end end love.graphics.print("- En käytä jatkossa kondomia.", 120, 300) love.graphics.setColor(0, 0, 0) if love.mouse.getX() > 120 and love.mouse.getX() < 600 then if love.mouse.getY() > 380 and love.mouse.getY() < 440 then love.graphics.setColor(0.6, 0.6, 0.6) end end love.graphics.setFont(Font35) love.graphics.print("- Aion jatkossa yrittää etäsiä\n vain neitsyttä.", 120, 380) love.graphics.setColor(0, 0, 0) if love.mouse.getX() > 120 and love.mouse.getX() < 600 then if love.mouse.getY() > 460 and love.mouse.getY() < 520 then love.graphics.setColor(0.6, 0.6, 0.6) end end love.graphics.setFont(Font45) love.graphics.print("- Olin jännittynyt tilanteessa.", 120, 460) end function state:mousereleased(x, y, button, istouch, presses) if x > 120 and x < 600 then if y > 300 and y < 360 then Sounds["click"]:play() Gamestate.switch(States["level23"]) elseif y > 380 and y < 440 then Sounds["click"]:play() Gamestate.switch(States["lose"]) elseif y > 460 and y < 520 then Sounds["click"]:play() Gamestate.switch(States["lose"]) end end end return state