- Notifications
You must be signed in to change notification settings - Fork 169
Expand file tree
/
Copy pathScriptModule.cs
More file actions
Latest commit
56 lines (45 loc) · 1.67 KB
/
Copy pathScriptModule.cs
File metadata and controls
56 lines (45 loc) · 1.67 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
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
namespaceKBEngine
{
usingUnityEngine;
usingSystem;
usingSystem.Collections;
usingSystem.Collections.Generic;
usingSystem.Reflection;
/*
一个entitydef中定义的脚本模块的描述类
包含了某个entity定义的属性与方法以及该entity脚本模块的名称与模块ID
*/
publicclassScriptModule
{
publicstringname;
publicboolusePropertyDescrAlias;
publicbooluseMethodDescrAlias;
publicDictionary<string,Property>propertys=newDictionary<string,Property>();
publicDictionary<UInt16,Property>idpropertys=newDictionary<UInt16,Property>();
publicDictionary<string,Method>methods=newDictionary<string,Method>();
publicDictionary<string,Method>base_methods=newDictionary<string,Method>();
publicDictionary<string,Method>cell_methods=newDictionary<string,Method>();
publicDictionary<UInt16,Method>idmethods=newDictionary<UInt16,Method>();
publicDictionary<UInt16,Method>idbase_methods=newDictionary<UInt16,Method>();
publicDictionary<UInt16,Method>idcell_methods=newDictionary<UInt16,Method>();
publicTypescript=null;
publicScriptModule(stringmodulename)
{
name=modulename;
foreach(System.Reflection.AssemblyassinAppDomain.CurrentDomain.GetAssemblies())
{
script=ass.GetType("KBEngine."+modulename);
if(script==null)
{
script=ass.GetType(modulename);
}
if(script!=null)
break;
}
usePropertyDescrAlias=false;
useMethodDescrAlias=false;
if(script==null)
Dbg.ERROR_MSG("can't load(KBEngine."+modulename+")!");
}
}
}