C# 클래스 GameGraphics.GraphicsModel

파일 보기 프로젝트 열기: pmyoung/Advanced-Game-Project 1 사용 예제들

공개 메소드들

메소드 설명
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