/// <summary> /// Removes the specified component. /// </summary> public void RemoveComponent(LogicComponent component) { LogicArrayList <LogicComponent> components = this._components[component.GetComponentType()]; int index = -1; for (int i = 0; i < components.Count; i++) { LogicComponent tmp = components[i]; if (tmp.Equals(component)) { index = i; break; } } if (index != -1) { components.Remove(index); } }
/// <summary> /// Adds the specified component to this instance. /// </summary> public void AddComponent(LogicComponent component) { this._components[component.GetComponentType()].Add(component); }