Beispiel #1
0
        public static void DoAfterLoadDll()
        {
            TotalEntitySize = DllInfos.GetTypes <Lockstep.ECS.ECDefine.IEntity>()
                              .Select(t => DllInfos.GetAttribute <EntityCountAttribute>(t).count).Sum();
            var txt         = File.ReadAllText(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, Facade.ConfigInfo.MacroDefinePath));
            var macroDefine = JsonMapper.ToObject <Dictionary <string, string> >(txt);

            Config.MacroDefine     = macroDefine;
            Facade.MacroExpend     = Config.MacroExpend;
            Facade.FuncGetTypeName = new Func <Type, string>[] { GetTypeName, GetTypeNameEntityPointer };
        }
Beispiel #2
0
 public static TypeInfo[] PrepareTypeInfosRef(Type[] rawTypes)
 {
     return(DllInfos.GetTypes(BT_REF, (bt, t) => !t.IsGenericType && DllInfos.IsTargetType(bt, t)));
 }
Beispiel #3
0
 public static TypeInfo[] PrepareTypeInfosEnum(Type[] rawTypes)
 {
     return(DllInfos.GetTypes(BT_ENUM, (bt, t) => t.IsEnum));
 }