summaryrefslogtreecommitdiff
path: root/global/global.lua
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-08-01 08:41:00 +0800
committerchai <chaifix@163.com>2018-08-01 08:41:00 +0800
commit5f9dc5209d621d6ce7d27936a24b23589142d0ae (patch)
tree905301682972c92a819ee746948ba9bea4da3ffe /global/global.lua
parent0efe3cf55bde25c0627899b36dbe1694dd338234 (diff)
*update
Diffstat (limited to 'global/global.lua')
-rw-r--r--global/global.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/global/global.lua b/global/global.lua
new file mode 100644
index 0000000..7cce50c
--- /dev/null
+++ b/global/global.lua
@@ -0,0 +1,13 @@
+local global = {}
+_G = _G or {}
+global._G = _G
+
+global.get = function(var)
+ return _G[var]
+end
+
+global.set = function(var, value)
+ _G[var] = value
+end
+
+return global \ No newline at end of file