/** * This is the preferred method to use when retrieving a component from a entity. It will provide good performance. * * @param type in order to retrieve the component fast you must provide a ComponentType instance for the expected component. * @return */ public Component GetComponent(ComponentType type) { System.Diagnostics.Debug.Assert(type != null); return(entityManager.GetComponent(this, type)); }
/** * This is the preferred method to use when retrieving a component from a entity. It will provide good performance. * * @param type in order to retrieve the component fast you must provide a ComponentType instance for the expected component. * @return */ public Component GetComponent(ComponentType type) { return(entityManager.GetComponent(this, type)); }
public T Get(Entity e) { return((T)em.GetComponent(e, type)); }
/// <summary> /// Gets the component for the given entity/component type combo /// </summary> /// <param name="e">Entity in which you are interested</param> /// <returns>Component</returns> public T Get(Entity e) { System.Diagnostics.Debug.Assert(e != null); return((T)em.GetComponent(e, type)); }