-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgamecontext.lua
57 lines (54 loc) · 1.21 KB
/
gamecontext.lua
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
local gamecontext = {}
local mt = { __index = gamecontext }
local setmetatable = setmetatable
function gamecontext.new()
local instance = {}
local vartable = {}
-- do nothing by default
function instance.showMessage(text, duration)
end
function instance.changeWorld(name, x)
end
function instance.addPortal(name, x, d, dx, silent)
end
function instance.removePortal(name)
end
function instance.addRegion(name, x, width)
end
function instance.y(x)
end
function instance.preferredColor()
end
function instance.getSwitchStatus(name)
end
function instance.setSwitchStatus(name, status)
end
function instance.getCounterValue(name)
end
function instance.win(text)
end
function instance.playSwitchSound()
end
function instance.playSound(name)
end
function instance.shakeCamera(d, m)
end
function instance.playerX()
end
function instance.left()
end
function instance.right()
end
function instance.setBackground(rgb)
end
function instance.setForeground(rgb)
end
function instance.getVar(name)
return vartable[name]
end
function instance.setVar(name, value)
vartable[name] = value
end
return setmetatable(instance, mt)
end
return gamecontext