C# Class GameGraphics.GraphicsModel

Afficher le fichier Open project: pmyoung/Advanced-Game-Project Class Usage Examples

Méthodes publiques

Méthode Description
GetAsDictionary ( ) : GraphicsObject>.Dictionary

When called will return a reference to the dictionary it uses

GetAsList ( ) : List

When called wil return the dictionary in a List format of its values to allow iteration.

GetObjectWithID ( int id ) : GraphicsObject

Returns the GraphicsObject with the given ID if no object with this ID exists then it returns null

GraphicsModel ( ) : System

Default Constructor that initializes the dictionary

Remove ( int id ) : System.Boolean

Attempts to remove a GraphicsObject with the specified ID from the dictionary

Update ( GraphicsObject obj ) : void

Update takes a GraphicsObject as a parameter. If there is an object with the same ID we will update the existing object with the new info otherwise we add the object to our dictionary of object

Method Details

GetAsDictionary() public méthode

When called will return a reference to the dictionary it uses
public GetAsDictionary ( ) : GraphicsObject>.Dictionary
Résultat GraphicsObject>.Dictionary

GetAsList() public méthode

When called wil return the dictionary in a List format of its values to allow iteration.
public GetAsList ( ) : List
Résultat List

GetObjectWithID() public méthode

Returns the GraphicsObject with the given ID if no object with this ID exists then it returns null
public GetObjectWithID ( int id ) : GraphicsObject
id int the ID of the GraphicsObject
Résultat GraphicsObject

GraphicsModel() public méthode

Default Constructor that initializes the dictionary
public GraphicsModel ( ) : System
Résultat System

Remove() public méthode

Attempts to remove a GraphicsObject with the specified ID from the dictionary
public Remove ( int id ) : System.Boolean
id int the unique ID of the Graphics object to be removed.
Résultat System.Boolean

Update() public méthode

Update takes a GraphicsObject as a parameter. If there is an object with the same ID we will update the existing object with the new info otherwise we add the object to our dictionary of object
public Update ( GraphicsObject obj ) : void
obj GraphicsObject The object that needs to be updated
Résultat void