예제 #1
0
 protected void CoupleComponent <T>(ICollection <T> target, Entity entity) //Add boolean to entity if it has multiples of same component types
 {
     if (entity.Components.TryGetValue(typeof(T), out var component))
     {
         target.Add(Functions_Operators.CastComponent <T>(component));
         component.Activate();
     }
 }
예제 #2
0
 public T GetSystem <T>()
 {
     return(Functions_Operators.CastSystem <T>(_systemSet.FirstOrDefault(system => system.GetType() == typeof(T))));
 }