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

Defines a concrete physics algorithm. It provides methods to update the world objects' positions depending on a simple physics algorithm, which only contains gravity and the difficulty level.
Наследование: Physics
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
SimplePhysicsAlgorithm ( CollisionHandler collisionHandler, World world, ConfigurationRetriever configRetriever ) : System

Creates a new SimplePhysicsAlgorithm object.

Update ( GameTime gameTime ) : void

Updates gravity effects, calculates the new positions of all world objects and then reports all new collisions to the collisionHandler.

Приватные методы

Метод Описание
GetCollisions ( ) : EtherDuels.Game.Model.WorldObject[][]
GetNewCollisions ( ) : EtherDuels.Game.Model.WorldObject[][]
UpdateDifficulty ( ) : void
UpdateExplosions ( GameTime gameTime ) : void
UpdateGravity ( GameTime gameTime ) : void
UpdatePositions ( GameTime gameTime ) : void

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

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

Creates a new SimplePhysicsAlgorithm object.
public SimplePhysicsAlgorithm ( CollisionHandler collisionHandler, World world, ConfigurationRetriever configRetriever ) : System
collisionHandler CollisionHandler The assigned CollisionHandler which will be informed about collisions.
world World The assigned World whose objects are to be updated.
configRetriever ConfigurationRetriever
Результат System

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

Updates gravity effects, calculates the new positions of all world objects and then reports all new collisions to the collisionHandler.
public Update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime The GameTime which contains how much time has passed since the last update.
Результат void