public Remove ( IForceUpdateable forceUpdateable ) : void | ||
forceUpdateable | IForceUpdateable | Item to remove. |
return | void |
public void Remove(IForceUpdateable forceUpdateable)
{
if (forceUpdateable.ForceUpdater == this)
{
if (forceUpdateable.IsDynamic && !dynamicObjects.Remove(forceUpdateable))
throw new Exception("Dynamic object not present in dynamic objects list; ensure that the IForceUpdateable was never removed from the list improperly by using ForceUpdateableBecomingKinematic.");
forceUpdateable.ForceUpdater = null;
}
else
throw new Exception("Cannot remove updateable; it does not belong to this manager.");
}