C# Class Project290.Particles.Particle

A single particle.
显示文件 Open project: scastle/Solitude Class Usage Examples

Public Properties

Property Type Description
Action ParticleAction
ActionUniqueIdentifier byte
CreationTime long
Position Vector2
Rotation float
RotationSpeed float
Scale float
Velocity Vector2
color Color

Public Methods

Method 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 method

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

Dispose() public method

Releases unmanaged and - optionally - managed resources
public Dispose ( ) : void
return void

Draw() public method

Draws this instance.
public Draw ( ) : void
return void

Particle() public method

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.
return System

Particle() public method

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.
return System

Reset() public method

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.
return void

Reset() public method

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.
return void

Update() public method

Updates this instance.
public Update ( ) : void
return void

Property Details

Action public_oe property

The action to be performed per update.
public ParticleAction Action
return 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
return byte

CreationTime public_oe property

Gets the creation time.
public long CreationTime
return long

Position public_oe property

Gets the position.
public Vector2 Position
return Vector2

Rotation public_oe property

The rotation of the particle.
public float Rotation
return float

RotationSpeed public_oe property

Speed at which an increase in rotation is applied.
public float RotationSpeed
return float

Scale public_oe property

The scale of the particle.
public float Scale
return float

Velocity public_oe property

Gets the velocity.
public Vector2 Velocity
return Vector2

color public_oe property

Gets the color to overlay the draw image with.
public Color color
return Color