GameObjectManager Class |
Namespace: DigitalRune.Game
The GameObjectManager type exposes the following members.
Name | Description | |
---|---|---|
GameObjectManager |
Initializes a new instance of the GameObjectManager class.
|
Name | Description | |
---|---|---|
Equals | (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Update |
Updates all game objects.
|
This class has a collection of game objects. The game can add objects and the objects will be updated once per frame. Therefore, Update(TimeSpan) has to be called once per frame in the game loop.
If a game objects removes another game object from the Objects list, the other object will be effectively removed at the end of Update(TimeSpan) method. That means Update(TimeSpan) for the current frame will still be executed, and in the next frame the object is removed.