- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
gr = love.graphics
win = love.window
lk = love.keyboard
require("button")
require("t")
function love.load()
local loading = {}
loading = serialize.load("records.lua")
font = gr.newFont("NotoSans.ttf",14)
mini = gr.newFont("NotoSans.ttf",10)
big = gr.newFont("NotoSans.ttf",30)
flag = nil --Flag = nil -menu, Flag = 1 -records, Flag = 2 -type game, Flag = 3 -type game standart, Flag = 4 -type game impulse, Flag = 5 -type game Invers, Flag = 6 -type game Unreal
kube = {x = 96, y = 196, colx = 8, coly = 8}
speed = 1
timer = 0
umber = {}
records = {{"Standart", 0},{"Impulse", 0},{"Invers", 0},{"Unreal", 0},{"XY diagonal", 0},{"Perpendiculars", 0}}
if loading and #loading > 0 then
for i = 1, #loading do
records[i][2] = loading[i]
end
end
score = 0
mb = {utton:create(200-font:getWidth(">Play<")/2,125,">Play<"),utton:create(200-font:getWidth(">Records<")/2,160,">Records<"),utton:create(200-font:getWidth(">Exit<")/2,195,">Exit<")}
tgb = {utton:create(200-font:getWidth(">Standart<")/2,60,">Standart<"),utton:create(200-font:getWidth(">Impulse<")/2,90,">Impulse<"),utton:create(200-font:getWidth(">Invers<")/2,120,">Invers<"),utton:create(200-font:getWidth(">Unreal<")/2,150,">Unreal<"),utton:create(200-font:getWidth(">XY diagonal<")/2,180,">XY diagonal<"),utton:create(200-font:getWidth(">Perpendiculars<")/2,210,">Perpendiculars<")}
back = utton:create(200-font:getWidth(" >Back< ")/2,300," >Back< ")
r = utton:create(200-font:getWidth(" >Restart< ")/2,250," >Restart< ")
end
local function restart()
kube = {x = 96, y = 196, colx = 8, coly = 8, speed = 350}
speed = 1
timer = 0
umber = {}
score = 0
toch = nil
end
My первый игра сделаная на love2d. Аж всплакнул.