C# Класс GameGraphics.GraphicsModel

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Описание методов

GetAsDictionary() публичный Метод

When called will return a reference to the dictionary it uses
public GetAsDictionary ( ) : GraphicsObject>.Dictionary
Результат GraphicsObject>.Dictionary

GetAsList() публичный Метод

When called wil return the dictionary in a List format of its values to allow iteration.
public GetAsList ( ) : List
Результат List

GetObjectWithID() публичный Метод

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
Результат GraphicsObject

GraphicsModel() публичный Метод

Default Constructor that initializes the dictionary
public GraphicsModel ( ) : System
Результат System

Remove() публичный Метод

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.
Результат System.Boolean

Update() публичный Метод

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
Результат void