C# Класс Project290.Particles.ParticleContainer

Used for storing a large number of Particles. This efficiently handles storing and updating them.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Add ( float xPosition, float yPosition, float xVelocity, float yVelocity, Color color, float scale, float rotation, byte actionUniqueIdentifier, ParticleAction action ) : bool

Adds a Particle.

Add ( float xPosition, float yPosition, float xVelocity, float yVelocity, Color color, float scale, float rotation, float rotationSpeed, byte actionUniqueIdentifier, ParticleAction action ) : bool

Adds a Particle.

ApplyAcceloration ( Vector2 &acceloration ) : void

Applies the acceloration to all particles.

Draw ( ) : void

Draws this instance.

ParticleContainer ( int maxParticles ) : System

Initializes a new instance of the ParticleContainer class.

Reset ( ) : void

Resets this instance.

Update ( ) : void

Updates this instance.

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

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

Checks to see if game clock reset.

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

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

Adds a Particle.
public Add ( float xPosition, float yPosition, float xVelocity, float yVelocity, Color color, float scale, float rotation, byte actionUniqueIdentifier, ParticleAction action ) : bool
xPosition float The x position.
yPosition float The y position.
xVelocity float The x velocity.
yVelocity float The y velocity.
color Color The color to overlay the drawn image with.
scale float The scale.
rotation float The rotation.
actionUniqueIdentifier byte This is used to identify what "type" in a custom action this particle belongs to. /// For example, you may want to have one action which could draw one of several different /// images. You can set this value to indicate which image to draw. This does not have /// to be used.
action ParticleAction The action. This should be a reference to a STATIC object, for memory sake.
Результат bool

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

Adds a Particle.
public Add ( float xPosition, float yPosition, float xVelocity, float yVelocity, Color color, float scale, float rotation, float rotationSpeed, byte actionUniqueIdentifier, ParticleAction action ) : bool
xPosition float The x position.
yPosition float The y position.
xVelocity float The x velocity.
yVelocity float The y velocity.
color Color The color to overlay the drawn image with.
scale float The scale.
rotation float The rotation.
rotationSpeed float The rotation speed.
actionUniqueIdentifier byte This is used to identify what "type" in a custom action this particle belongs to. /// For example, you may want to have one action which could draw one of several different /// images. You can set this value to indicate which image to draw. This does not have /// to be used.
action ParticleAction The action. This should be a reference to a STATIC object, for memory sake.
Результат bool

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

Applies the acceloration to all particles.
public ApplyAcceloration ( Vector2 &acceloration ) : void
acceloration Vector2 The acceloration.
Результат void

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

Draws this instance.
public Draw ( ) : void
Результат void

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

Initializes a new instance of the ParticleContainer class.
public ParticleContainer ( int maxParticles ) : System
maxParticles int The maximum number of particles.
Результат System

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

Resets this instance.
public Reset ( ) : void
Результат void

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

Updates this instance.
public Update ( ) : void
Результат void