コード例 #1
0
        public Aspect Build (World w)
        {
            ComponentTypeFactory tf = w.ComponentManager.TypeFactory;
            Aspect aspect = new Aspect();
            this.Associate(tf, allTypes, aspect.AllSet);
            this.Associate(tf, exclusionTypes, aspect.ExclusionSet);
            this.Associate(tf, oneTypes, aspect.OneSet);

            return aspect;
        }
コード例 #2
0
ファイル: EntityModule.cs プロジェクト: enBask/Asgard
 public List<JSValue> GetEntities(Aspect aspect)
 {
     var em = _instance.EntityManager;
     var lst = em.GetEntities(aspect);
     List<JSValue> ents = new List<JSValue>();
     foreach(var e in lst)
     {
         ents.Add(JSValue.Wrap(e));
     }
     return ents;
 }
コード例 #3
0
        public EntitySubscription(World world, AspectPromise builder)
        {
            aspect = builder.Build(world);
            promise = builder;
            aspectCache = new BitSet();
            em = world.EntityManager;

            activeEntityIds = new BitSet();
            entities = new Bag<int>();

            listeners = new Bag<ISubscriptionListener>();

            insertedIds = new BitSet();
            removedIds = new BitSet();

            inserted = new Bag<int>();
            removed = new Bag<int>();
        }
コード例 #4
0
 public IntervalEntityProcessingSystem(int interval, Aspect aspect)
     : base(interval,aspect)
 {
 }
コード例 #5
0
 public ParallelEntityProcessingSystem(Aspect aspect)
     : base(aspect)
 {
 }
コード例 #6
0
 /// <summary>
 /// Create a new DelayedEntityProcessingSystem. It requires an Aspect
 /// </summary>
 /// <param name="aspect"></param>
 public DelayedEntityProcessingSystem(Aspect aspect)
     : base(aspect)
 {
 }
コード例 #7
0
 public EntitySystem(Aspect aspect)
 {
     System.Diagnostics.Debug.Assert(aspect != null);
     this.aspect = aspect;
 }
コード例 #8
0
 public EntitySystem(params Type[] types)
 {
     aspect = Aspect.All(types);
 }
コード例 #9
0
 public IntervalEntitySystem(int interval, Aspect aspect)
     : base(aspect)
 {
     this.interval = interval;
 }
コード例 #10
0
 public DelayedEntitySystem(Aspect aspect)
     : base(aspect)
 {
 }