internal Entity(Caboodle entityWorld, int id) { this._world = entityWorld; this._id = id; this._active = true; this.mask = new Utils.BitMask(); }
public ComponentCollection(Caboodle world, int id) { this.caboodle = world; this.id = id; this.components = new Dictionary <int, T>(); //this.components = new Table<T>(); }
public EntityManager(Caboodle world) : base(world) { this._components = new ComponentManager(world); this.entities = new Table <Entity>(); _components.OnAdded += OnEntityAddedComponent; _components.OnRemoved += OnEntityRemovedComponent; }
public void TestInit() { caboodle = new Caboodle(); caboodle.Systems.Add <MockSystem2>(); caboodle.Systems.Add <MockSystem1>(); caboodle.Systems.Add <MockSystem3>(); caboodle.Systems.Init(); //caboodle.Systems.Add(Assembly.GetAssembly(typeof(SystemTest))); Assert.IsNotNull(caboodle, "Failed to initialize."); }
public void TestInit() { caboodle = new Caboodle(); caboodle.Systems.Add <MockSystem1>(); caboodle.Systems.Add <MockSystem2>(); caboodle.Systems.Add <MockSystem3>(); caboodle.Systems.Init(); Assert.IsNotNull(caboodle, "Failed to initialize."); }
public void InitTest() { try { caboodle = new Caboodle(); caboodle.Systems.Add <MockSystem1>(); caboodle.Systems.Init(); } finally { Assert.IsNotNull(caboodle, "Failed to initialize ECS."); } }
internal void SetAttr(Caboodle c, int id, uint priority, Aspect aspect, Attributes.LoopType loopType, global::System.Type systemType) { this._caboodle = c; this._systemId = id; this._priority = priority; this._aspect = aspect; this._loopType = loopType; this.systemType = systemType; }
public SystemManager(Caboodle caboodle) : base(caboodle) { this.caboodle.Entities.OnChange += ScheduleEntityChange; this.caboodle.Entities.OnRemoved += ScheduleEntityRemove; this.all_systems = new List <SystemInfo>(); this.entityCache = new Utils.Table <Utils.Table <Entity> >(); this.entitiesToRemove = new List <Entity>(); this.entitiesToChange = new List <int>(); this.scheduledActions = new List <Action>(); nextSystemId = 0; }
public PoolManager(Caboodle caboodle, int maxComps) : base(caboodle) { this.max = maxComps; }
public PoolManager(Caboodle caboodle) : base(caboodle) { }
public CManager(Caboodle caboodle) { this.caboodle = caboodle; }
public ComponentManager(Caboodle caboodle) : base(caboodle) { componentCollections = new List <IComponentCollection>(); componentCollectionCache = new Dictionary <global::System.Type, IComponentCollection>(); }