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 }; }
public static IEnumerable GetEntityArray(string param) { var clsName = Facade.ForceGetEnvToken(Define.PC_CLS_NAME); var type = DllInfos.GetType(clsName); var size = DllInfos.GetAttribute <EntityCountAttribute>(type).count; var ary = new int[size]; for (int i = 0; i < size; i++) { ary[i] = i; } return(ary); }
public static string GetEntitySize() { return(DllInfos.GetAttribute <EntityCountAttribute>(curType.RawType).count.ToString()); }
public static int GetEntityCount(Type entityType) { return(DllInfos.GetAttribute <EntityCountAttribute>(entityType).count); }