namespace KBEngine { using UnityEngine; using System; using System.Collections; using System.Collections.Generic; using System.Reflection; /* 一个entitydef中定义的脚本模块的描述类 包含了某个entity定义的属性与方法以及该entity脚本模块的名称与模块ID */ public class ScriptModule { public string name; public bool usePropertyDescrAlias; public bool useMethodDescrAlias; public Dictionary propertys = new Dictionary(); public Dictionary idpropertys = new Dictionary(); public Dictionary methods = new Dictionary(); public Dictionary base_methods = new Dictionary(); public Dictionary cell_methods = new Dictionary(); public Dictionary idmethods = new Dictionary(); public Dictionary idbase_methods = new Dictionary(); public Dictionary idcell_methods = new Dictionary(); public Type script = null; public ScriptModule(string modulename) { name = modulename; foreach (System.Reflection.Assembly ass in AppDomain.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 + ")!"); } } }