コード例 #1
0
 internal Entity(Caboodle entityWorld, int id)
 {
     this._world  = entityWorld;
     this._id     = id;
     this._active = true;
     this.mask    = new Utils.BitMask();
 }
コード例 #2
0
 public ComponentCollection(Caboodle world, int id)
 {
     this.caboodle   = world;
     this.id         = id;
     this.components = new Dictionary <int, T>();
     //this.components = new Table<T>();
 }
コード例 #3
0
        public EntityManager(Caboodle world) : base(world)
        {
            this._components = new ComponentManager(world);
            this.entities    = new Table <Entity>();

            _components.OnAdded   += OnEntityAddedComponent;
            _components.OnRemoved += OnEntityRemovedComponent;
        }
コード例 #4
0
 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.");
 }
コード例 #5
0
        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.");
        }
コード例 #6
0
 public void InitTest()
 {
     try
     {
         caboodle = new Caboodle();
         caboodle.Systems.Add <MockSystem1>();
         caboodle.Systems.Init();
     }
     finally { Assert.IsNotNull(caboodle, "Failed to initialize ECS."); }
 }
コード例 #7
0
ファイル: Processor.cs プロジェクト: AustinSmith13/CaboodleES
 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;
 }
コード例 #8
0
 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;
 }
コード例 #9
0
 public PoolManager(Caboodle caboodle, int maxComps) : base(caboodle)
 {
     this.max = maxComps;
 }
コード例 #10
0
 public PoolManager(Caboodle caboodle) : base(caboodle)
 {
 }
コード例 #11
0
 public CManager(Caboodle caboodle)
 {
     this.caboodle = caboodle;
 }
コード例 #12
0
 public ComponentManager(Caboodle caboodle) : base(caboodle)
 {
     componentCollections     = new List <IComponentCollection>();
     componentCollectionCache = new Dictionary <global::System.Type, IComponentCollection>();
 }