Added project files
109
hump/gamestate.lua
Normal file
@ -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
|
49
level1.lua
Normal file
@ -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
|
60
level10.lua
Normal file
@ -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
|
61
level11.lua
Normal file
@ -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
|
60
level12.lua
Normal file
@ -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
|
60
level13.lua
Normal file
@ -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
|
60
level14.lua
Normal file
@ -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
|
60
level15.lua
Normal file
@ -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
|
60
level16.lua
Normal file
@ -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
|
60
level17.lua
Normal file
@ -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
|
64
level18.lua
Normal file
@ -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
|
64
level19.lua
Normal file
@ -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
|
49
level2.lua
Normal file
@ -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
|
60
level20.lua
Normal file
@ -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
|
63
level21.lua
Normal file
@ -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
|
62
level22.lua
Normal file
@ -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
|
63
level23.lua
Normal file
@ -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
|
49
level3.lua
Normal file
@ -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
|
62
level4.lua
Normal file
@ -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
|
62
level5.lua
Normal file
@ -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
|
63
level6.lua
Normal file
@ -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
|
50
level7.lua
Normal file
@ -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
|
60
level8.lua
Normal file
@ -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
|
61
level9.lua
Normal file
@ -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
|
23
lose.lua
Normal file
@ -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
|
84
main.lua
Normal file
@ -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
|
36
mainmenu.lua
Normal file
@ -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
|
36
newstate1.lua
Normal file
@ -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
|
36
newstate2.lua
Normal file
@ -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
|
BIN
resources/click.mp3
Normal file
BIN
resources/font.ttf
Normal file
BIN
resources/level1.png
Normal file
After Width: | Height: | Size: 78 KiB |
BIN
resources/level10.png
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
resources/level11.png
Normal file
After Width: | Height: | Size: 71 KiB |
BIN
resources/level12.png
Normal file
After Width: | Height: | Size: 83 KiB |
BIN
resources/level13.png
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
resources/level14.png
Normal file
After Width: | Height: | Size: 71 KiB |
BIN
resources/level15.png
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
resources/level16.png
Normal file
After Width: | Height: | Size: 106 KiB |
BIN
resources/level17.png
Normal file
After Width: | Height: | Size: 79 KiB |
BIN
resources/level18.png
Normal file
After Width: | Height: | Size: 74 KiB |
BIN
resources/level19.png
Normal file
After Width: | Height: | Size: 106 KiB |
BIN
resources/level2.png
Normal file
After Width: | Height: | Size: 94 KiB |
BIN
resources/level20.png
Normal file
After Width: | Height: | Size: 106 KiB |
BIN
resources/level21.png
Normal file
After Width: | Height: | Size: 71 KiB |
BIN
resources/level22.png
Normal file
After Width: | Height: | Size: 106 KiB |
BIN
resources/level23.png
Normal file
After Width: | Height: | Size: 74 KiB |
BIN
resources/level3.png
Normal file
After Width: | Height: | Size: 106 KiB |
BIN
resources/level4.png
Normal file
After Width: | Height: | Size: 39 KiB |
BIN
resources/level5.png
Normal file
After Width: | Height: | Size: 91 KiB |
BIN
resources/level6.png
Normal file
After Width: | Height: | Size: 74 KiB |
BIN
resources/level7.png
Normal file
After Width: | Height: | Size: 51 KiB |
BIN
resources/level8.png
Normal file
After Width: | Height: | Size: 59 KiB |
BIN
resources/level9.png
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
resources/lose.png
Normal file
After Width: | Height: | Size: 172 KiB |
BIN
resources/menu.png
Normal file
After Width: | Height: | Size: 33 KiB |
BIN
resources/newstate.png
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
resources/win.png
Normal file
After Width: | Height: | Size: 100 KiB |
26
win.lua
Normal file
@ -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
|