commit be575baa02e5a9a9bc518c6d6ca1180077233529 Author: Jonttuuu <50843099+Jonttuuu@users.noreply.github.com> Date: Sun Sep 27 15:04:17 2020 +0300 Added project files diff --git a/hump/gamestate.lua b/hump/gamestate.lua new file mode 100644 index 0000000..ab14224 --- /dev/null +++ b/hump/gamestate.lua @@ -0,0 +1,109 @@ +--[[ +Copyright (c) 2010-2013 Matthias Richter +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. +Except as contained in this notice, the name(s) of the above copyright holders +shall not be used in advertising or otherwise to promote the sale, use or +other dealings in this Software without prior written authorization. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +]]-- + +local function __NULL__() end + + -- default gamestate produces error on every callback +local state_init = setmetatable({leave = __NULL__}, + {__index = function() error("Gamestate not initialized. Use Gamestate.switch()") end}) +local stack = {state_init} +local initialized_states = setmetatable({}, {__mode = "k"}) +local state_is_dirty = true + +local GS = {} +function GS.new(t) return t or {} end -- constructor - deprecated! + +local function change_state(stack_offset, to, ...) + local pre = stack[#stack] + + -- initialize only on first call + ;(initialized_states[to] or to.init or __NULL__)(to) + initialized_states[to] = __NULL__ + + stack[#stack+stack_offset] = to + state_is_dirty = true + return (to.enter or __NULL__)(to, pre, ...) +end + +function GS.switch(to, ...) + assert(to, "Missing argument: Gamestate to switch to") + assert(to ~= GS, "Can't call switch with colon operator") + ;(stack[#stack].leave or __NULL__)(stack[#stack]) + return change_state(0, to, ...) +end + +function GS.push(to, ...) + assert(to, "Missing argument: Gamestate to switch to") + assert(to ~= GS, "Can't call push with colon operator") + return change_state(1, to, ...) +end + +function GS.pop(...) + assert(#stack > 1, "No more states to pop!") + local pre, to = stack[#stack], stack[#stack-1] + stack[#stack] = nil + ;(pre.leave or __NULL__)(pre) + state_is_dirty = true + return (to.resume or __NULL__)(to, pre, ...) +end + +function GS.current() + return stack[#stack] +end + +-- XXX: don't overwrite love.errorhandler by default: +-- this callback is different than the other callbacks +-- (see http://love2d.org/wiki/love.errorhandler) +-- overwriting thi callback can result in random crashes (issue #95) +local all_callbacks = { 'draw', 'update' } + +-- fetch event callbacks from love.handlers +for k in pairs(love.handlers) do + all_callbacks[#all_callbacks+1] = k +end + +function GS.registerEvents(callbacks) + local registry = {} + callbacks = callbacks or all_callbacks + for _, f in ipairs(callbacks) do + registry[f] = love[f] or __NULL__ + love[f] = function(...) + registry[f](...) + return GS[f](...) + end + end +end + +-- forward any undefined functions +setmetatable(GS, {__index = function(_, func) + -- call function only if at least one 'update' was called beforehand + -- (see issue #46) + if not state_is_dirty or func == 'update' then + state_is_dirty = false + return function(...) + return (stack[#stack][func] or __NULL__)(stack[#stack], ...) + end + end + return __NULL__ +end}) + +return GS diff --git a/level1.lua b/level1.lua new file mode 100644 index 0000000..5da3655 --- /dev/null +++ b/level1.lua @@ -0,0 +1,49 @@ +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["level1"], 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("Haluan neitsyen, luonteella ja iällä\nei väliä.", 103, 117) + + love.graphics.setFont(Font60) + + 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("- Kyllä", 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.print("- Ei", 120, 380) + +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["level2"]) + elseif y > 380 and y < 440 then + Sounds["click"]:play() + Gamestate.switch(States["lose"]) + end + end +end + +return state diff --git a/level10.lua b/level10.lua new file mode 100644 index 0000000..328b3b0 --- /dev/null +++ b/level10.lua @@ -0,0 +1,60 @@ +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["level10"], 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("Mun ehdoton minimi on", 103, 117) + + love.graphics.setFont(Font60) + + 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("- 16", 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.print("- 13", 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.print("- 18", 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["lose"]) + elseif y > 380 and y < 440 then + Sounds["click"]:play() + Gamestate.switch(States["level11"]) + elseif y > 460 and y < 520 then + Sounds["click"]:play() + Gamestate.switch(States["lose"]) + end + end +end + +return state diff --git a/level11.lua b/level11.lua new file mode 100644 index 0000000..ea80262 --- /dev/null +++ b/level11.lua @@ -0,0 +1,61 @@ +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["level11"], 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("Kaasukammioon joutais", 103, 117) + + 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.setFont(Font35) + love.graphics.print("- ne jotka kieltävät rakkauden\n lapsiltaan.", 120, 300) + + 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() > 380 and love.mouse.getY() < 440 then + love.graphics.setColor(0.6, 0.6, 0.6) + end + end + love.graphics.print("- ne jotka kritisoivat mua.", 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.print("- ne jotka ovat autistisia.", 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["level12"]) + 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 diff --git a/level12.lua b/level12.lua new file mode 100644 index 0000000..38c7530 --- /dev/null +++ b/level12.lua @@ -0,0 +1,60 @@ +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["level12"], 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("Kerran pyyhkäisin paksut limat", 103, 117) + + love.graphics.setFont(Font60) + + 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("- iskän pyyhkeeseen.", 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.print("- kissan kylkeen.", 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.print("- siskon lakanaan.", 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["lose"]) + elseif y > 380 and y < 440 then + Sounds["click"]:play() + Gamestate.switch(States["level13"]) + elseif y > 460 and y < 520 then + Sounds["click"]:play() + Gamestate.switch(States["lose"]) + end + end +end + +return state diff --git a/level13.lua b/level13.lua new file mode 100644 index 0000000..fbcea7d --- /dev/null +++ b/level13.lua @@ -0,0 +1,60 @@ +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["level13"], 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("Ajaminen on kielletty", 103, 117) + + love.graphics.setFont(Font60) + + 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("- riisikupeilla.", 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.print("- bemareilla.", 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.print("- munakipoilla.", 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["level14"]) + 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 diff --git a/level14.lua b/level14.lua new file mode 100644 index 0000000..b2c4d16 --- /dev/null +++ b/level14.lua @@ -0,0 +1,60 @@ +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["level14"], 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("No _ menee huumorini ylitse.", 103, 117) + + love.graphics.setFont(Font60) + + 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("- pedofilia", 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.print("- homot", 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.print("- maahanmuuttajat", 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["level15"]) + 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 diff --git a/level15.lua b/level15.lua new file mode 100644 index 0000000..cab6191 --- /dev/null +++ b/level15.lua @@ -0,0 +1,60 @@ +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["level15"], 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("En ole _ mulla on iso _.", 103, 117) + + love.graphics.setFont(Font60) + + 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("- heikko, lihas", 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.print("- rasisti, muna", 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.print("- läski, ego", 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["lose"]) + 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["level16"]) + end + end +end + +return state diff --git a/level16.lua b/level16.lua new file mode 100644 index 0000000..6df7fcf --- /dev/null +++ b/level16.lua @@ -0,0 +1,60 @@ +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["level16"], 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("_ siksi, että saan jonkun.", 103, 117) + + love.graphics.setFont(Font60) + + 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("- Valitan", 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.print("- Esineellistän", 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.print("- Yleistän", 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["lose"]) + elseif y > 380 and y < 440 then + Sounds["click"]:play() + Gamestate.switch(States["level17"]) + elseif y > 460 and y < 520 then + Sounds["click"]:play() + Gamestate.switch(States["lose"]) + end + end +end + +return state diff --git a/level17.lua b/level17.lua new file mode 100644 index 0000000..231b1be --- /dev/null +++ b/level17.lua @@ -0,0 +1,60 @@ +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["level17"], 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("Mä voisin hierasta [SENSORED]\nmun _.", 103, 117) + + love.graphics.setFont(Font60) + + 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("- timumiekalla", 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.print("- valosapelilla", 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.print("- Millikiiturilla", 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["newstate2"]) + 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 diff --git a/level18.lua b/level18.lua new file mode 100644 index 0000000..9a65484 --- /dev/null +++ b/level18.lua @@ -0,0 +1,64 @@ +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["level18"], 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("Tapaan tytön, mitä teen?", 103, 117) + + love.graphics.setFont(Font35) + + 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("- Valitan tämän painosta discordissa.", 120, 300) + + 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() > 380 and love.mouse.getY() < 440 then + love.graphics.setColor(0.6, 0.6, 0.6) + end + end + love.graphics.print("- Koskettelen itseäni salaa.", 120, 380) + + love.graphics.setFont(Font35) + + 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.print("- Kysyn haluasiko hän timanttimiekkaa.", 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["level19"]) + 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 diff --git a/level19.lua b/level19.lua new file mode 100644 index 0000000..4ed003f --- /dev/null +++ b/level19.lua @@ -0,0 +1,64 @@ +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["level19"], 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("Neitsyt tyttö on kiinnostunut\nminusta, mitä teen?", 103, 117) + + love.graphics.setFont(Font60) + + 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("- Panen häntä.", 120, 300) + + love.graphics.setFont(Font35) + + 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.print("- Pidän hänet kaverina, koska\n hän on liian thick.", 120, 380) + + 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() > 460 and love.mouse.getY() < 520 then + love.graphics.setColor(0.6, 0.6, 0.6) + end + end + love.graphics.print("- Haukun hänet läskiksi.", 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["lose"]) + elseif y > 380 and y < 440 then + Sounds["click"]:play() + Gamestate.switch(States["level20"]) + elseif y > 460 and y < 520 then + Sounds["click"]:play() + Gamestate.switch(States["lose"]) + end + end +end + +return state diff --git a/level2.lua b/level2.lua new file mode 100644 index 0000000..3637ec8 --- /dev/null +++ b/level2.lua @@ -0,0 +1,49 @@ +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["level2"], 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("Kriteereistä voi luopua.", 103, 117) + + love.graphics.setFont(Font60) + + 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("- Kyllä", 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.print("- Ei", 120, 380) + +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["lose"]) + elseif y > 380 and y < 440 then + Sounds["click"]:play() + Gamestate.switch(States["level3"]) + end + end +end + +return state diff --git a/level20.lua b/level20.lua new file mode 100644 index 0000000..10ac698 --- /dev/null +++ b/level20.lua @@ -0,0 +1,60 @@ +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["level20"], 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("Olen mielestäni ", 103, 117) + + love.graphics.setFont(Font60) + + 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("- tosi mies.", 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.print("- lammas.", 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.print("- alfauros.", 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["lose"]) + 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["level21"]) + end + end +end + +return state diff --git a/level21.lua b/level21.lua new file mode 100644 index 0000000..e62648d --- /dev/null +++ b/level21.lua @@ -0,0 +1,63 @@ +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["level21"], 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("Joustan kriteereissä ja pääsen\nlähelle pesää, mikä menee vikaan?", 103, 117) + + love.graphics.setFont(Font35) + + 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.setFont(Font35) + love.graphics.print("- Jännityksen takia timumiekka\n ei ole terässä.", 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(Font45) + love.graphics.print("- En osaa käyttää kondomia.", 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(Font60) + love.graphics.print("- Tyttö teki oharit.", 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["lose"]) + elseif y > 380 and y < 440 then + Sounds["click"]:play() + Gamestate.switch(States["level22"]) + elseif y > 460 and y < 520 then + Sounds["click"]:play() + Gamestate.switch(States["lose"]) + end + end +end + +return state diff --git a/level22.lua b/level22.lua new file mode 100644 index 0000000..c7e35ba --- /dev/null +++ b/level22.lua @@ -0,0 +1,62 @@ +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 diff --git a/level23.lua b/level23.lua new file mode 100644 index 0000000..a4c28a6 --- /dev/null +++ b/level23.lua @@ -0,0 +1,63 @@ +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("Miten tästä eteenpäin?", 103, 117) + + + + 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.setFont(Font35) + love.graphics.print("- Yritän saman tytön kanssa\n ilman kumia.", 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(Font45) + love.graphics.print("- Vaihdan toiseen naiseen.", 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(Font60) + love.graphics.print("- Tapan itseni.", 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["win"]) + 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 diff --git a/level3.lua b/level3.lua new file mode 100644 index 0000000..672f718 --- /dev/null +++ b/level3.lua @@ -0,0 +1,49 @@ +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["level3"], 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ä teen illalla?", 103, 117) + + love.graphics.setFont(Font60) + + 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("- Pelaan mäinkräftiä", 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.print("- Näen kavereita", 120, 380) + +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["level4"]) + elseif y > 380 and y < 440 then + Sounds["click"]:play() + Gamestate.switch(States["lose"]) + end + end +end + +return state diff --git a/level4.lua b/level4.lua new file mode 100644 index 0000000..a0eaafa --- /dev/null +++ b/level4.lua @@ -0,0 +1,62 @@ +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["level4"], 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("Mänkräftissä on pelaajalla tyttö\nskini, mitä teen?", 103, 117) + + love.graphics.setFont(Font60) + + 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("- Yritän iskeä tätä", 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(Font45) + love.graphics.print("- Kysyn pelaajan sukupuolta", 120, 380) + love.graphics.setFont(Font60) + + 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.print("- Annan asian olla", 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["level5"]) + 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 diff --git a/level5.lua b/level5.lua new file mode 100644 index 0000000..3fba0e8 --- /dev/null +++ b/level5.lua @@ -0,0 +1,62 @@ +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["level5"], 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("Pelaaja paljastuu liian vanhaksi,\nmitä teen?", 103, 117) + + love.graphics.setFont(Font60) + + 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("- Annan asian olla", 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("- Teen hänestä kyltin\n seinälleni mänkräftissä.", 120, 380) + love.graphics.setFont(Font60) + + 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.print("- Valitan hänen iästään", 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["lose"]) + elseif y > 380 and y < 440 then + Sounds["click"]:play() + Gamestate.switch(States["level6"]) + elseif y > 460 and y < 520 then + Sounds["click"]:play() + Gamestate.switch(States["lose"]) + end + end +end + +return state diff --git a/level6.lua b/level6.lua new file mode 100644 index 0000000..866f11b --- /dev/null +++ b/level6.lua @@ -0,0 +1,63 @@ +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["level6"], 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("Kiinnostava tyttö lähestyy minua\nnetissä, mitä teen?", 103, 117) + + love.graphics.setFont(Font60) + + 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.setFont(Font45) + love.graphics.print("- Kysyn onko hän neitsyt", 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(Font60) + love.graphics.print("- Kysyn hänen ikäänsä", 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("- Kysyn miten hänellä menee", 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["level7"]) + 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 diff --git a/level7.lua b/level7.lua new file mode 100644 index 0000000..b25ed3f --- /dev/null +++ b/level7.lua @@ -0,0 +1,50 @@ +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["level7"], 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("Sinut juuri catfishattiin, miten\nreagoit?", 103, 117) + + love.graphics.setFont(Font60) + + 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("- Annan asian olla.", 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("- Haukun kaikki jotka eivät\n ole neitsyitä.", 120, 380) + +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["lose"]) + elseif y > 380 and y < 440 then + Sounds["click"]:play() + Gamestate.switch(States["level8"]) + end + end +end + +return state diff --git a/level8.lua b/level8.lua new file mode 100644 index 0000000..3144a0a --- /dev/null +++ b/level8.lua @@ -0,0 +1,60 @@ +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["level8"], 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("Miten saan neitsyen itselleni?", 103, 117) + + love.graphics.setFont(Font35) + + 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("- Pukeudun siististi ja näytän\n siten rikkaammalta.", 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.print("- Ostan kalliin bemarin kelan\n rahoilla.", 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.print("- Vien naisen ulos hienoon\n ravintolaan.", 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["lose"]) + elseif y > 380 and y < 440 then + Sounds["click"]:play() + Gamestate.switch(States["level9"]) + elseif y > 460 and y < 520 then + Sounds["click"]:play() + Gamestate.switch(States["lose"]) + end + end +end + +return state diff --git a/level9.lua b/level9.lua new file mode 100644 index 0000000..e7ce60a --- /dev/null +++ b/level9.lua @@ -0,0 +1,61 @@ +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["level9"], 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("Miten pukeudun siististi?", 103, 117) + + love.graphics.setFont(Font60) + + 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.setFont(Font45) + love.graphics.print("- Farkut ja siisti paita.", 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.print("- Siistit farkut ja kauluspaita.", 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.print("- Lokärit ja puman T-Paita.", 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["lose"]) + 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["newstate1"]) + end + end +end + +return state diff --git a/lose.lua b/lose.lua new file mode 100644 index 0000000..c9c4f36 --- /dev/null +++ b/lose.lua @@ -0,0 +1,23 @@ +local 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.draw(Images["lose"], 640, 0) + love.graphics.rectangle("fill", 100, 310, 440, 100) + love.graphics.setColor(0, 0, 0) + love.graphics.rectangle("line", 100, 310, 440, 100) + love.graphics.setFont(Font60) + love.graphics.print("Hävisit pelin!", 160, 330) + love.graphics.setFont(Font35) + love.graphics.print("Oi voi, ei noin voi toimia!", 150, 430) +end + +function state:mousereleased(x, y, button, istouch, presses) + Gamestate.switch(States["menu"]) +end + +return state diff --git a/main.lua b/main.lua new file mode 100644 index 0000000..81f4aff --- /dev/null +++ b/main.lua @@ -0,0 +1,84 @@ +Gamestate = require "hump.gamestate" + +States = {} + +States["menu"] = require "mainmenu" +States["lose"] = require "lose" +States["win"] = require "win" + +States["level1"] = require "level1" +States["level2"] = require "level2" +States["level3"] = require "level3" +States["level4"] = require "level4" +States["level5"] = require "level5" +States["level6"] = require "level6" +States["level7"] = require "level7" +States["level8"] = require "level8" +States["level9"] = require "level9" + +States["newstate1"] = require "newstate1" + +States["level10"] = require "level10" +States["level11"] = require "level11" +States["level12"] = require "level12" +States["level13"] = require "level13" +States["level14"] = require "level14" +States["level15"] = require "level15" +States["level16"] = require "level16" +States["level17"] = require "level17" + +States["newstate2"] = require "newstate2" + +States["level18"] = require "level18" +States["level19"] = require "level19" +States["level20"] = require "level20" +States["level21"] = require "level21" +States["level22"] = require "level22" +States["level23"] = require "level23" + +Images = {} +Sounds = {} + +function love.load() + love.window.setMode(1280,720) + + Font60 = love.graphics.newFont("resources/font.ttf", 60) + Font45 = love.graphics.newFont("resources/font.ttf", 45) + Font35 = love.graphics.newFont("resources/font.ttf", 35) + + Sounds["click"] = love.audio.newSource("resources/click.mp3", "static") + + Images["menu"] = love.graphics.newImage("resources/menu.png") + Images["lose"] = love.graphics.newImage("resources/lose.png") + Images["win"] = love.graphics.newImage("resources/win.png") + Images["newstate"] = love.graphics.newImage("resources/newstate.png") + + Images["level1"] = love.graphics.newImage("resources/level1.png") + Images["level2"] = love.graphics.newImage("resources/level2.png") + Images["level3"] = love.graphics.newImage("resources/level3.png") + Images["level4"] = love.graphics.newImage("resources/level4.png") + Images["level5"] = love.graphics.newImage("resources/level5.png") + Images["level6"] = love.graphics.newImage("resources/level6.png") + Images["level7"] = love.graphics.newImage("resources/level7.png") + Images["level8"] = love.graphics.newImage("resources/level8.png") + Images["level9"] = love.graphics.newImage("resources/level9.png") + + Images["level10"] = love.graphics.newImage("resources/level10.png") + Images["level11"] = love.graphics.newImage("resources/level11.png") + Images["level12"] = love.graphics.newImage("resources/level12.png") + Images["level13"] = love.graphics.newImage("resources/level13.png") + Images["level14"] = love.graphics.newImage("resources/level14.png") + Images["level15"] = love.graphics.newImage("resources/level15.png") + Images["level16"] = love.graphics.newImage("resources/level16.png") + Images["level17"] = love.graphics.newImage("resources/level17.png") + + Images["level18"] = love.graphics.newImage("resources/level18.png") + Images["level19"] = love.graphics.newImage("resources/level19.png") + Images["level20"] = love.graphics.newImage("resources/level20.png") + Images["level21"] = love.graphics.newImage("resources/level21.png") + Images["level22"] = love.graphics.newImage("resources/level22.png") + Images["level23"] = love.graphics.newImage("resources/level23.png") + + Gamestate.registerEvents() + Gamestate.switch(States["menu"]) +end diff --git a/mainmenu.lua b/mainmenu.lua new file mode 100644 index 0000000..ffaa100 --- /dev/null +++ b/mainmenu.lua @@ -0,0 +1,36 @@ +local menu = {} + +function menu:enter() + love.graphics.setBackgroundColor(0.9, 0.9, 0.9) +end + +function menu:draw() + love.graphics.setColor(0.8, 0.8, 0.8) + love.graphics.rectangle("fill", 0, 480, 1280, 240) + love.graphics.setColor(1, 1, 1) + love.graphics.draw(Images["menu"], 490, 50) + love.graphics.rectangle("fill", 80, 405, 1120, 150) + love.graphics.setColor(0, 0, 0) + love.graphics.rectangle("line", 80, 405, 1120, 150) + love.graphics.setFont(Font60) + love.graphics.print("Näin saat tyttöystävän feat. Johtaja98", 150, 425) + love.graphics.setFont(Font35) + love.graphics.print("Miten Johtaja98 toimisi seuraavissa tilanteissa?", 280,500) + + love.graphics.setFont(Font60) + if love.mouse.getX() > 578 and love.mouse.getX() < 703 then + if love.mouse.getY() > 620 and love.mouse.getY() < 670 then + love.graphics.setColor(0.6, 0.6, 0.6) + end + end + love.graphics.print("Pelaa", 578, 620) +end + +function menu:mousereleased(x, y, button, istouch, presses) + if x > 578 and x < 703 and y > 620 and y < 670 then + Sounds["click"]:play() + Gamestate.switch(States["level1"]) + end +end + +return menu diff --git a/newstate1.lua b/newstate1.lua new file mode 100644 index 0000000..3a8339e --- /dev/null +++ b/newstate1.lua @@ -0,0 +1,36 @@ +local state = {} + +function state:enter() + love.graphics.setBackgroundColor(0.9, 0.9, 0.9) +end + +function state:draw() + love.graphics.setColor(0.8, 0.8, 0.8) + love.graphics.rectangle("fill", 0, 480, 1280, 240) + love.graphics.setColor(1, 1, 1) + love.graphics.draw(Images["newstate"], 490, 50) + love.graphics.rectangle("fill", 80, 405, 1120, 150) + love.graphics.setColor(0, 0, 0) + love.graphics.rectangle("line", 80, 405, 1120, 150) + love.graphics.setFont(Font60) + love.graphics.print("Läpäisit ensimmäisen tason", 300, 425) + love.graphics.setFont(Font35) + love.graphics.print("Seuraavaksi täydennä Johtaja98:n kuuluisia lauseita.", 270,500) + + love.graphics.setFont(Font60) + if love.mouse.getX() > 578 and love.mouse.getX() < 703 then + if love.mouse.getY() > 620 and love.mouse.getY() < 670 then + love.graphics.setColor(0.6, 0.6, 0.6) + end + end + love.graphics.print("Jatka", 570, 620) +end + +function state:mousereleased(x, y, button, istouch, presses) + if x > 570 and x < 711 and y > 620 and y < 670 then + Sounds["click"]:play() + Gamestate.switch(States["level10"]) + end +end + +return state diff --git a/newstate2.lua b/newstate2.lua new file mode 100644 index 0000000..e37215a --- /dev/null +++ b/newstate2.lua @@ -0,0 +1,36 @@ +local state = {} + +function state:enter() + love.graphics.setBackgroundColor(0.9, 0.9, 0.9) +end + +function state:draw() + love.graphics.setColor(0.8, 0.8, 0.8) + love.graphics.rectangle("fill", 0, 480, 1280, 240) + love.graphics.setColor(1, 1, 1) + love.graphics.draw(Images["newstate"], 490, 50) + love.graphics.rectangle("fill", 80, 405, 1120, 150) + love.graphics.setColor(0, 0, 0) + love.graphics.rectangle("line", 80, 405, 1120, 150) + love.graphics.setFont(Font60) + love.graphics.print("Läpäisit toisen tason", 400, 425) + love.graphics.setFont(Font35) + love.graphics.print("Seuraavaksi täydennä Johtaja98:n kuuluisia lauseita.", 270,500) + + love.graphics.setFont(Font60) + if love.mouse.getX() > 578 and love.mouse.getX() < 703 then + if love.mouse.getY() > 620 and love.mouse.getY() < 670 then + love.graphics.setColor(0.6, 0.6, 0.6) + end + end + love.graphics.print("Jatka", 570, 620) +end + +function state:mousereleased(x, y, button, istouch, presses) + if x > 570 and x < 711 and y > 620 and y < 670 then + Sounds["click"]:play() + Gamestate.switch(States["level18"]) + end +end + +return state diff --git a/resources/click.mp3 b/resources/click.mp3 new file mode 100644 index 0000000..9e0783f Binary files /dev/null and b/resources/click.mp3 differ diff --git a/resources/font.ttf b/resources/font.ttf new file mode 100644 index 0000000..bfccdf3 Binary files /dev/null and b/resources/font.ttf differ diff --git a/resources/level1.png b/resources/level1.png new file mode 100644 index 0000000..9d53fce Binary files /dev/null and b/resources/level1.png differ diff --git a/resources/level10.png b/resources/level10.png new file mode 100644 index 0000000..f7d4ace Binary files /dev/null and b/resources/level10.png differ diff --git a/resources/level11.png b/resources/level11.png new file mode 100644 index 0000000..3ac0d74 Binary files /dev/null and b/resources/level11.png differ diff --git a/resources/level12.png b/resources/level12.png new file mode 100644 index 0000000..19c6d94 Binary files /dev/null and b/resources/level12.png differ diff --git a/resources/level13.png b/resources/level13.png new file mode 100644 index 0000000..f6715ec Binary files /dev/null and b/resources/level13.png differ diff --git a/resources/level14.png b/resources/level14.png new file mode 100644 index 0000000..3ac0d74 Binary files /dev/null and b/resources/level14.png differ diff --git a/resources/level15.png b/resources/level15.png new file mode 100644 index 0000000..1fa705b Binary files /dev/null and b/resources/level15.png differ diff --git a/resources/level16.png b/resources/level16.png new file mode 100644 index 0000000..6777f55 Binary files /dev/null and b/resources/level16.png differ diff --git a/resources/level17.png b/resources/level17.png new file mode 100644 index 0000000..68ed95b Binary files /dev/null and b/resources/level17.png differ diff --git a/resources/level18.png b/resources/level18.png new file mode 100644 index 0000000..1fbdb29 Binary files /dev/null and b/resources/level18.png differ diff --git a/resources/level19.png b/resources/level19.png new file mode 100644 index 0000000..6777f55 Binary files /dev/null and b/resources/level19.png differ diff --git a/resources/level2.png b/resources/level2.png new file mode 100644 index 0000000..6826367 Binary files /dev/null and b/resources/level2.png differ diff --git a/resources/level20.png b/resources/level20.png new file mode 100644 index 0000000..6777f55 Binary files /dev/null and b/resources/level20.png differ diff --git a/resources/level21.png b/resources/level21.png new file mode 100644 index 0000000..3ac0d74 Binary files /dev/null and b/resources/level21.png differ diff --git a/resources/level22.png b/resources/level22.png new file mode 100644 index 0000000..6777f55 Binary files /dev/null and b/resources/level22.png differ diff --git a/resources/level23.png b/resources/level23.png new file mode 100644 index 0000000..1fbdb29 Binary files /dev/null and b/resources/level23.png differ diff --git a/resources/level3.png b/resources/level3.png new file mode 100644 index 0000000..6777f55 Binary files /dev/null and b/resources/level3.png differ diff --git a/resources/level4.png b/resources/level4.png new file mode 100644 index 0000000..08b0807 Binary files /dev/null and b/resources/level4.png differ diff --git a/resources/level5.png b/resources/level5.png new file mode 100644 index 0000000..615b862 Binary files /dev/null and b/resources/level5.png differ diff --git a/resources/level6.png b/resources/level6.png new file mode 100644 index 0000000..1fbdb29 Binary files /dev/null and b/resources/level6.png differ diff --git a/resources/level7.png b/resources/level7.png new file mode 100644 index 0000000..82a7810 Binary files /dev/null and b/resources/level7.png differ diff --git a/resources/level8.png b/resources/level8.png new file mode 100644 index 0000000..f6715ec Binary files /dev/null and b/resources/level8.png differ diff --git a/resources/level9.png b/resources/level9.png new file mode 100644 index 0000000..1fa705b Binary files /dev/null and b/resources/level9.png differ diff --git a/resources/lose.png b/resources/lose.png new file mode 100644 index 0000000..8a52179 Binary files /dev/null and b/resources/lose.png differ diff --git a/resources/menu.png b/resources/menu.png new file mode 100644 index 0000000..3fb0e88 Binary files /dev/null and b/resources/menu.png differ diff --git a/resources/newstate.png b/resources/newstate.png new file mode 100644 index 0000000..33126d7 Binary files /dev/null and b/resources/newstate.png differ diff --git a/resources/win.png b/resources/win.png new file mode 100644 index 0000000..fa652a9 Binary files /dev/null and b/resources/win.png differ diff --git a/win.lua b/win.lua new file mode 100644 index 0000000..1a80d32 --- /dev/null +++ b/win.lua @@ -0,0 +1,26 @@ +local state = {} + +function state:enter() + love.graphics.setBackgroundColor(0.9, 0.9, 0.9) +end + +function state:draw() + love.graphics.setColor(0.8, 0.8, 0.8) + love.graphics.rectangle("fill", 0, 480, 1280, 240) + love.graphics.setColor(1, 1, 1) + love.graphics.draw(Images["win"], 0, 0) + love.graphics.rectangle("fill", 80, 405, 1120, 235) + love.graphics.setColor(0, 0, 0) + love.graphics.rectangle("line", 80, 405, 1120, 235) + love.graphics.setFont(Font60) + love.graphics.print("Onnittelut löysit tyttöystävän yhdessä", 150, 425) + love.graphics.print("Johtaja98:n kanssa!", 380, 505) + love.graphics.setFont(Font35) + love.graphics.print("Mutta kuka tämä tyttöystävä on?.", 375,580) +end + +function state:mousereleased(x, y, button, istouch, presses) + Gamestate.switch(States["menu"]) +end + +return state