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

A single particle.
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
Action ParticleAction
ActionUniqueIdentifier byte
CreationTime long
Position Vector2
Rotation float
RotationSpeed float
Scale float
Velocity Vector2
color Color

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

Метод Описание
ApplyAcceloration ( Vector2 &acceloration ) : void

Applies the acceloration to the velcoity of the particle.

Dispose ( ) : void

Releases unmanaged and - optionally - managed resources

Draw ( ) : void

Draws this instance.

Particle ( float xPosition, float yPosition, float xVelocity, float yVelocity, Color color, float scale, float rotation, byte actionUniqueIdentifier, ParticleAction action ) : System

Initializes a new instance of the Particle class.

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

Initializes a new instance of the Particle class.

Reset ( float xPosition, float yPosition, float xVelocity, float yVelocity, Color color, float scale, float rotation, byte actionUniqueIdentifier, ParticleAction action ) : void

Resets the specified x position.

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

Resets the specified x position.

Update ( ) : void

Updates this instance.

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

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

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

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

Releases unmanaged and - optionally - managed resources
public Dispose ( ) : void
Результат void

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

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

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

Initializes a new instance of the Particle class.
public Particle ( float xPosition, float yPosition, float xVelocity, float yVelocity, Color color, float scale, float rotation, byte actionUniqueIdentifier, ParticleAction action ) : System
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.
Результат System

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

Initializes a new instance of the Particle class.
public Particle ( float xPosition, float yPosition, float xVelocity, float yVelocity, Color color, float scale, float rotation, float rotationSpeed, byte actionUniqueIdentifier, ParticleAction action ) : System
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 rotaiton 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.
Результат System

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

Resets the specified x position.
public Reset ( float xPosition, float yPosition, float xVelocity, float yVelocity, Color color, float scale, float rotation, byte actionUniqueIdentifier, ParticleAction action ) : void
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.
Результат void

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

Resets the specified x position.
public Reset ( float xPosition, float yPosition, float xVelocity, float yVelocity, Color color, float scale, float rotation, float rotationSpeed, byte actionUniqueIdentifier, ParticleAction action ) : void
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.
Результат void

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

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

Описание свойств

Action публичное свойство

The action to be performed per update.
public ParticleAction Action
Результат ParticleAction

ActionUniqueIdentifier публичное свойство

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.
public byte ActionUniqueIdentifier
Результат byte

CreationTime публичное свойство

Gets the creation time.
public long CreationTime
Результат long

Position публичное свойство

Gets the position.
public Vector2 Position
Результат Vector2

Rotation публичное свойство

The rotation of the particle.
public float Rotation
Результат float

RotationSpeed публичное свойство

Speed at which an increase in rotation is applied.
public float RotationSpeed
Результат float

Scale публичное свойство

The scale of the particle.
public float Scale
Результат float

Velocity публичное свойство

Gets the velocity.
public Vector2 Velocity
Результат Vector2

color публичное свойство

Gets the color to overlay the draw image with.
public Color color
Результат Color