C# 클래스 EtherDuels.Game.Model.GameModel

The GameModel is responsible for updating the logic of the game repeatedly.
파일 보기 프로젝트 열기: julius/pse_spacewar 1 사용 예제들

공개 메소드들

메소드 설명
GameModel ( ShortLifespanObjectFactory factory, Physics physics, List players, World world ) : System

Creates a new GameModel object.

GetFactory ( ) : ShortLifespanObjectFactory

Returns the assigned ShortLifespanObjectFactory.

RemovePlayer ( Player player ) : void

Removes the assigned player from the list of players.

Update ( FrameState frameState ) : void

Updates the physics and all players.

메소드 상세

GameModel() 공개 메소드

Creates a new GameModel object.
public GameModel ( ShortLifespanObjectFactory factory, Physics physics, List players, World world ) : System
factory ShortLifespanObjectFactory The assigned ShortLifespanObjectFactory to create new WorldObjects.
physics Physics The assigned Physics to calculate new positions.
players List An array of all participating players.
world World The assigned World.
리턴 System

GetFactory() 공개 메소드

Returns the assigned ShortLifespanObjectFactory.
public GetFactory ( ) : ShortLifespanObjectFactory
리턴 ShortLifespanObjectFactory

RemovePlayer() 공개 메소드

Removes the assigned player from the list of players.
public RemovePlayer ( Player player ) : void
player Player The player which has to be removed.
리턴 void

Update() 공개 메소드

Updates the physics and all players.
public Update ( FrameState frameState ) : void
frameState FrameState A state object which contains how much time has passed since the last update.
리턴 void