Пример #1
0
 /// <summary>
 /// Checks if <see cref="Entity"/> needs to be either added or removed.
 /// </summary>
 /// <param name="entity">The entity.</param>
 /// <param name="entityComponent"></param>
 protected internal abstract void ProcessEntityComponent(Entity entity, EntityComponent entityComponent, bool forceRemove);
Пример #2
0
 /// <summary>
 /// Gets a component by the specified key.
 /// </summary>
 /// <typeparam name="T">Type of the component</typeparam>
 /// <returns>The component or null if does no exist</returns>
 /// <exception cref="System.ArgumentNullException">key</exception>
 public T Get <T>() where T : EntityComponent, new()
 {
     return((T)Components.Get(EntityComponent.GetDefaultKey <T>()));
 }