T AddComponent<T>() where T : Component | Adds a component of type ‘T’, if it does not already exist, and returns it. |
T As<T>() where T : Entity | |
bool Equals(Entity other) | |
T GetComponent<T>() where T : Component | Returns the component of type ‘T’, if it exists. |
Entity GetParent() | Returns the entity’s parent, if it exists. |
bool HasComponent<T>() where T : Component | |
void Log() | Logs the entity’s ID to the console. |
void RemoveComponent<T>() where T : Component | Removes the component of type ‘T’, if it exists. |
void SetParent(Entity parent) | Sets the entity’s parent to the given entity. |
void Rotate(Vec3 rotation) | Adds the given rotation to the entity’s rotation. |
void Translate(Vec3 translation) | Adds the given translation to the entity’s translation. |
override bool Equals(object obj) | |
override int GetHashCode() | |
override string ToString() | Returns the entity’s ID as a string. |
abstract void OnCollisionEnter2D(Entity other) | |
abstract void OnCollisionExit2D(Entity other) | |
abstract void OnCreate() | Called when the scene starts. |
abstract void OnTriggerEnter2D(Entity other) | |
abstract void OnTriggerExit2D(Entity other) | |
abstract void OnUpdate(float ts) | Called once every frame. |
static void Destroy(Entity entity) | Destroys the given entity. |
static Entity FindEntityByName(string name) | |
static Entity Instantiate(string name) | Instantiates an empty entity. |
static Entity Instantiate(Entity parent, string name) | Instantiates an empty entity and sets its parent to the given entity. |
static operator ==(Entity entity1, Entity entity2) | |
static operator !=(Entity entity1, Entity entity2) | |
static implicit operator ulong(Entity e) | |
static implicit operator Entity(ulong id) | |