public virtual void Update()
{
if (NeedsUpdate)
{
InternalUpdate();
AuxiliaryUpdate();
NeedsUpdate = false;
}
else
{
if (DisallowMultipleUpdates)
{
throw new MultipleUpdateException(
string.Format(
"UpdatableObject '{0}' was manually updated twice in a single game tick. If you wish " +
"to allow this, set the object's `DisallowMultipleUpdates` property to false.", this
)
);
}
}
}