-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefine.lua
96 lines (71 loc) · 1.98 KB
/
define.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---@meta
---@class ScriptRegister
---@field identity string
---@field name string
---@field userConfig UserConfig
---@field configUpdate? function(config)
---@field getApplicableScripts function (unityBundle)-> { [string]: SubScriptEntry }
---@class UserConfig:{[number]: UserEditableConfigItem}
---@class UserEditableConfigItem
---@field identity string
---@field text string
---@field tip? string
---@field kind UserEditableConfigKind
---@alias UserEditableConfigKind SwitchConfig | SelectConfig | TextConfig
---@class SwitchConfig
---@field ty "switch"
---@field default boolean
---@class SelectConfig
---@field ty "select"
---@field default string
---@field selects Selects
---@alias Selects {[string] : string}
---@class TextConfig
---@field ty "text"
---@field default string
---@enum ConfigKind
ConfigKind = {
Switch = "switch",
Select = "select",
Text = "text"
}
---@class ScriptConfig
---@field identity string
---@field config {[string] : UserConfigVariable }
ScriptConfig = {}
---@alias UserConfigVariable SwitchConfigVariable|SelectConfigVariable|TextConfigVariable
---@class SwitchConfigVariable
---@field ty "switch"
---@field value boolean
---@class SelectConfigVariable
---@field ty "select"
---@field value string
---@class TextConfigVariable
---@field ty "text"
---@field value string
---@param key string
---@return string
function ScriptConfig:storageLoad(key) end
---@param key string
---@param value string
function ScriptConfig:storageStore(key, value) end
---@class SubScriptEntry
---@field name string
---@field entry function(script,unityBundle,manager)
---@class Log
Log = {}
---@param args {[string]: any}
function Log:info(args) end
---@param args {[string]: any}
function Log:debug(args) end
---@param args {[string]: any}
function Log:error(args) end
---@param args {[string]: any}
function Log:warn(args) end
---@param args {[string]: any}
function Log:trace(args) end
return {
ConfigKind = ConfigKind,
ScripScriptConfigt = ScriptConfig,
Log = Log
}