Files
Main/Assets/GameAssets/Resources/Lua/Global/GlobalConst.lua
2025-01-25 04:38:09 +08:00

28 lines
685 B
Lua
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

------------------------------------------------
--作者gzg
--日期2019-03-25
--文件GlobalConst.lua
--模块GlobalConst
--描述:全局常量的定义
------------------------------------------------
local GlobalConst = {
--打开URL的事件ID
OpenURLEventID = 102
}
--这里对表进行处理,只允许读取,不允许设置
local L_MetaTable = {}
L_MetaTable.__index = function(table,key)
return GlobalConst[key];
end
L_MetaTable.__newindex = function(table,key,value)
Debug.LogError("Hi! Hi! Don't play fire!" .. tostring(key) .. "::" .. tostring(value));
end
local L_RetTable = setmetatable({},L_MetaTable);
return L_RetTable