-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.lua
More file actions
31 lines (27 loc) · 1.02 KB
/
main.lua
File metadata and controls
31 lines (27 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
-- main.lua
-- documantation https://low2d.nicepage.io
--[[
['plugin.orientation'] = {publisherId = 'tech.scotth'},
['plugin.utf8'] = {publisherId = 'com.coronalabs'},
['plugin.exportFile'] = {publisherId = 'com.solar2d'},
["plugin.tinyfiledialogs"] = { publisherId = "com.xibalbastudios",supportedPlatforms = { android = false } },
["plugin.androidFilePicker"] = {publisherId="tech.scotth",marketplaceId = "zag4fj"},
]] -- plugins in low
-- defolt scene - 'main'
require 'low.main'
require 'low.global'
local ob = {}
function low.main()
local posx = save.load('posx' , 0)
local posy = save.load('posy' , 0)
ob['квадрат'] = graphics.rect('fill' , posx , posy , 100 , 100)
end
function low.update()
if low.mouse.type == 'drag' then
graphics.set.x(ob['квадрат'] , low.mouse.x)
graphics.set.y(ob['квадрат'] , low.mouse.y)
save.save('posx' , ob['квадрат'].x)
save.save('posy' , ob['квадрат'].y)
end
--print(low.mouse.type)
end