function love.load()
mouse = {
x = love.mouse.getX(),
y = love.mouse.getY(),
showtext = ""
}
window = {
width = 1250,
height = 750
}
font = {
medium = love.graphics.newFont(20),
big = love.graphics.newFont(45)
}
stats = {}
require "images" --Images have all the files for photos
require "audio" --Like images but for soulds and music
require "cookie"
require "achievement" --Why not have Achievements?!?
require "milestone" --Cant forget Milestones!!! :)
end
function love.update(dt)
mouse.x = love.mouse.getX()
mouse.y = love.mouse.getY()
cookie.cpsCollect()
end
function love.mousepressed(x, y, button, istouch)
if button == 1 then
cookie.collect()
end
end
function stats.save()
if not love.filesystem.isFile("save.txt") then
love.filesystem.newFile("save.txt")
end
end
function love.draw()
--This area is the background
love.graphics.draw(image.background.blue)
love.graphics.draw(image.background.blue, 600, 0)
love.graphics.draw(image.background.blue, 0, 600)
love.graphics.draw(image.background.blue, 600, 600)
love.graphics.draw(image.background.blue, 1200, 0)
love.graphics.draw(image.background.blue, 1200, 600)
--Finnished with the blue stuff! :D
love.graphics.setColor(0, 0, 0, 100)
love.graphics.rectangle("fill", window.width / 3 * 2 + 80, 0, window.width / 3, window.height + 100)
love.graphics.reset()
love.graphics.draw(image.separator.horizontal, window.width / 3, 100)
love.graphics.draw(image.separator.vertical, window.width / 3, 512)
love.graphics.draw(image.separator.vertical, window.width / 3, 0)
love.graphics.draw(image.separator.vertical, window.width / 3 * 2 + 80, 0)
love.graphics.draw(image.separator.vertical, window.width / 3 * 2 + 80, 512)
--End Of Background
love.graphics.setColor(0, 0, 0, 100)
love.graphics.rectangle("fill", 0, 100, window.width / 3, 100)
love.graphics.reset()
love.graphics.setFont(font.big)
love.graphics.printf(cookie.money, 0, 125, window.width / 3, "center")
love.graphics.setFont(font.medium)
love.graphics.printf(active, window.width / 3 + 115, 10, 300, "center")
love.graphics.draw(cookie.image, cookie.x, cookie.y) --Clicking this image gives you a cookie
love.graphics.setFont(font.medium)
love.graphics.print(mouse.showtext, mouse.x, mouse.y - 10)
stats.save()
end it looks a lot different in the actual code.
and when I run the code, I get this...