C# Class Project290.Particles.Particle

A single particle.
Afficher le fichier Open project: scastle/Solitude Class Usage Examples

Méthodes publiques

Свойство Type Description
Action ParticleAction
ActionUniqueIdentifier byte
CreationTime long
Position Vector2
Rotation float
RotationSpeed float
Scale float
Velocity Vector2
color Color

Méthodes publiques

Méthode Description
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.

Method Details

ApplyAcceloration() public méthode

Applies the acceloration to the velcoity of the particle.
public ApplyAcceloration ( Vector2 &acceloration ) : void
acceloration Vector2 The acceloration.
Résultat void

Dispose() public méthode

Releases unmanaged and - optionally - managed resources
public Dispose ( ) : void
Résultat void

Draw() public méthode

Draws this instance.
public Draw ( ) : void
Résultat void

Particle() public méthode

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.
Résultat System

Particle() public méthode

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.
Résultat System

Reset() public méthode

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.
Résultat void

Reset() public méthode

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.
Résultat void

Update() public méthode

Updates this instance.
public Update ( ) : void
Résultat void

Property Details

Action public_oe property

The action to be performed per update.
public ParticleAction Action
Résultat ParticleAction

ActionUniqueIdentifier public_oe property

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
Résultat byte

CreationTime public_oe property

Gets the creation time.
public long CreationTime
Résultat long

Position public_oe property

Gets the position.
public Vector2 Position
Résultat Vector2

Rotation public_oe property

The rotation of the particle.
public float Rotation
Résultat float

RotationSpeed public_oe property

Speed at which an increase in rotation is applied.
public float RotationSpeed
Résultat float

Scale public_oe property

The scale of the particle.
public float Scale
Résultat float

Velocity public_oe property

Gets the velocity.
public Vector2 Velocity
Résultat Vector2

color public_oe property

Gets the color to overlay the draw image with.
public Color color
Résultat Color