C# Класс Drought.Graphics.Particles.ParticleSystem

The main component in charge of displaying particles.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
AddParticle ( Vector3 position, Vector3 velocity ) : void

Adds a new particle to the system.

SetCamera ( Matrix view, Matrix projection ) : void

Sets the camera view and projection matrices that will be used to draw this particle system.

render ( GameTime gameTime, GraphicsDevice device ) : void

Draws the particle system.

update ( GameTime gameTime ) : void

Updates the particle system.

Защищенные методы

Метод Описание
InitializeSettings ( ParticleSettings settings ) : void

Derived particle system classes should override this method and use it to initalize their tweakable settings.

ParticleSystem ( Microsoft.Xna.Framework.Content.ContentManager content, GraphicsDevice graphics ) : System

Constructor.

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

Метод Описание
AddNewParticlesToVertexBuffer ( ) : void

Helper for uploading new particles from our managed array to the GPU vertex buffer.

FreeRetiredParticles ( ) : void

Helper for checking when retired particles have been kept around long enough that we can be sure the GPU is no longer using them. It moves old particles from the retired area of the queue to the free section.

LoadParticleEffect ( GraphicsDevice graphics ) : void

Helper for loading and initializing the particle effect.

RetireActiveParticles ( ) : void

Helper for checking when active particles have reached the end of their life. It moves old particles from the active area of the queue to the retired section.

SetParticleRenderStates ( RenderState renderState ) : void

Helper for setting the renderstates used to draw particles.

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

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

Adds a new particle to the system.
public AddParticle ( Vector3 position, Vector3 velocity ) : void
position Vector3
velocity Vector3
Результат void

InitializeSettings() защищенный абстрактный Метод

Derived particle system classes should override this method and use it to initalize their tweakable settings.
protected abstract InitializeSettings ( ParticleSettings settings ) : void
settings ParticleSettings
Результат void

ParticleSystem() защищенный Метод

Constructor.
protected ParticleSystem ( Microsoft.Xna.Framework.Content.ContentManager content, GraphicsDevice graphics ) : System
content Microsoft.Xna.Framework.Content.ContentManager
graphics GraphicsDevice
Результат System

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

Sets the camera view and projection matrices that will be used to draw this particle system.
public SetCamera ( Matrix view, Matrix projection ) : void
view Matrix
projection Matrix
Результат void

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

Draws the particle system.
public render ( GameTime gameTime, GraphicsDevice device ) : void
gameTime Microsoft.Xna.Framework.GameTime
device GraphicsDevice
Результат void

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

Updates the particle system.
public update ( GameTime gameTime ) : void
gameTime Microsoft.Xna.Framework.GameTime
Результат void