C# Класс EtherDuels.Game.Model.GameModel

The GameModel is responsible for updating the logic of the game repeatedly.
Показать файл Открыть проект Примеры использования класса

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

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