Beispiel #1
0
        /*public static Dictionary<int, ME.ECS.IComponentsBase> GetComponentsStorage(IWorldBase world) {
         *
         *  var field = world.GetType().GetField("componentsCache", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);
         *  var dic = (IList)field.GetValue(world);
         *  WorldHelper.componentsCache.Clear();
         *  foreach (var item in dic) {
         *
         *      WorldHelper.componentsCache.Add(, (ME.ECS.IComponentsBase)item);
         *
         *  }
         *
         *  return WorldHelper.componentsCache;
         *
         * }*/

        public static IList[] GetEntitiesStorage(IWorldBase world)
        {
            var field = world.GetType().GetField("storagesCache", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);

            return((IList[])field.GetValue(world));
        }
Beispiel #2
0
        public static IList <ME.ECS.IModuleBase> GetModules(IWorldBase world)
        {
            var field = world.GetType().GetField("modules", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);

            return(((IList)field.GetValue(world)).Cast <ME.ECS.IModuleBase>().ToList());
        }
Beispiel #3
0
        public static FiltersStorage GetFilters(IWorldBase world)
        {
            var field = world.GetType().GetField("filtersStorage", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic);

            return((FiltersStorage)field.GetValue(world));
        }