/// <summary> /// Registers object to be to be updated each frame. /// </summary> public void RegisterUpdateable(IUpdateable updateable) { int key = updateable.GetHashCode(); if (!_toBeUpdatedKeys.Contains(key)) { _toBeUpdated.Add(new KeyValuePair <int, WeakReference <IUpdateable> >(key, new WeakReference <IUpdateable>(updateable))); _toBeUpdatedKeys.Add(key); } }