예제 #1
0
 public void EntitasForEachOneComp()
 {
     foreach (Entity entity in _entitasWorld.GetGroup(Matcher <EntitasEntity> .AllOf(0).NoneOf(1, 3)))
     {
         EntitasComponentA comp = (EntitasComponentA)entity.GetComponent(0);
         comp.Value++;
     }
 }
예제 #2
0
 public void EntitasForEachTwoComp()
 {
     foreach (Entity entity in _entitasWorld.GetGroup(Matcher <EntitasEntity> .AllOf(0, 2).NoneOf(1, 3)))
     {
         EntitasComponentA compA = (EntitasComponentA)entity.GetComponent(0);
         EntitasComponentC compC = (EntitasComponentC)entity.GetComponent(2);
         compA.Value++;
         compC.Value++;
     }
 }