1. Lua / Говнокод #25667

    +2

    1. 01
    2. 02
    3. 03
    4. 04
    5. 05
    6. 06
    7. 07
    8. 08
    9. 09
    10. 10
    11. 11
    12. 12
    13. 13
    14. 14
    15. 15
    16. 16
    17. 17
    18. 18
    19. 19
    20. 20
    21. 21
    22. 22
    23. 23
    24. 24
    25. 25
    26. 26
    27. 27
    28. 28
    29. 29
    30. 30
    31. 31
    32. 32
    33. 33
    34. 34
    35. 35
    36. 36
    37. 37
    38. 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. Аж всплакнул.

    Запостил: 3oJIoTou_xyu, 07 Июня 2019

    Комментарии (27) RSS

    Добавить комментарий