CSS Logo XNACS1Lib Library Documentation
XNACS1Particle Members

Game-Themed Introductory Programming Project   

XNACS1Particle overview

Public Instance Constructors

XNACS1Particle Overloaded. Initializes a new instance of the XNACS1Particle class.

Public Instance Properties

Center Center of the primitive.
CenterX (inherited from XNACS1Primitive) X coordinate of the center position of the primitive.
CenterY (inherited from XNACS1Primitive) Y coordinate of the center position of the primitive.
Color (inherited from XNACS1Primitive) Color of the primitive. (undefined for PrimitiveSet).
CurrentSpriteSheetFrameX (inherited from XNACS1Primitive) Gets or Sets the zero-based current sprite column for sprite sheet drawing.
CurrentSpriteSheetFrameY (inherited from XNACS1Primitive) Gets or Sets the zero-based current sprite row for sprite sheet drawing.
DisplacementAmplitude The amplitude of the Particle TravelMode displacement. For example, the amplitude of the Sine Wave.
DisplacementFrequency The frequency of the Particle TravelMode displacement. The default is 1, values between 0..1 would stretch a sine wave while values >1 would compress it.
FrontDirection (inherited from XNACS1Primitive) Sets the front direction of the primitive. Setting FrontDireciton will cause the RotateAngle and NormalDirection of the primitive to be updated accordingly. y default, when RotateAngle is 0, FrontDireciton points towards (1,0) [positive X-direction]. E.g., if we set RotateAngle to 90-degrees, FrontDireciton will be updated accordinlgy to (0,1) [positive y-direciton], or rotated 90-degress in the anit-clockwise direction
Label (inherited from XNACS1Primitive) Annotated text label to be associated with the primitive.
LabelColor (inherited from XNACS1Primitive) Color of the anontated text label.
Life Gets or sets the life parameter of a particle.
MaxBound (inherited from XNACS1Primitive) Upper left corner of the primitive.
MinBound (inherited from XNACS1Primitive) Lower left corner of the Primitive.
NormalDirection (inherited from XNACS1Primitive) Get or Set the normal direction of the primitive. Setting NormalDirection will update RotateAngle and FrontDirection accordingly.
Radius (inherited from XNACS1Circle) Radius of the circle.
RotateAngle (inherited from XNACS1Primitive) Rotate the primitive by the Angle specified (in degree). After the rotation, the FrontDirection of the primitive will be udpated accordingly. By default, when RotateAngle is 0, FrontDireciton points towards (1,0) [positive X-direction]. E.g., if we set RotateAngle to 90-degrees, FrontDireciton will be updated accordinlgy to (0,1) [positive y-direciton], or rotated 90-degress in the anit-clockwise direction
ShouldTravel Defines if the primitive should move by its current velocity. Defaults to false.
Speed (inherited from XNACS1Primitive) Get/Set the speed (magnitude of the Velocity vector) for the velocity.
Texture (inherited from XNACS1Primitive) Texture file name (without the "." or the extension) to cover the primitive.
TextureTintColor (inherited from XNACS1Primitive) If a primitive has a texture assigned, this will change the tint and or opacity of the texture when drawn, Color.White is no tint or opacity.
TravelMode Gets or Sets the primitive's TravelMode if ShouldTravel = True. Used in conjunction with DisplacementAmplitude and DisplacementFrequecy.
UseSpriteSheet (inherited from XNACS1Primitive) Allow the primitive to draw as a sprite sheet.
UseSpriteSheetAnimation (inherited from XNACS1Primitive) Allow the primitive to follow a specified sprite sheet animation sequence.
Velocity (inherited from XNACS1Primitive) Velocity of a primitive. This is a true velocity: with magnitude (speed) and direction for tavel.
VelocityDirection (inherited from XNACS1Primitive) Get/Set the direction of the velocity.
VelocityX (inherited from XNACS1Primitive) Get/Set the x-component of the primitive velocity.
VelocityY (inherited from XNACS1Primitive) Get/Set the y-component of the primitive velocity.
Visible (inherited from XNACS1Primitive) Whether the primitive is visible.

Public Instance Methods

Above (inherited from XNACS1Primitive) Returns if the center of this primitive is "above" (in y) in relation to the center of otherPrimitive.
AddToAutoDrawSet (inherited from XNACS1Primitive) Add this primitive to the AutoDrawSet. If this primitive already exists in the draw set, this function call is ignored. By default, all primitive are added into the AutoDrawSet.
Below (inherited from XNACS1Primitive) Returns if the center of this primitive is "below" (in y) in relation to the center of otherPrimitive.
Collided (inherited from XNACS1Primitive)Overloaded. Determines if this primitive collides with the otherPrimitive. If true, pos is the colliding position.
Draw (inherited from XNACS1Primitive) If visible, draws the primitive with the associated text label.
HasNonZeroVelocity (inherited from XNACS1Primitive) Retruns if the current velocity is non-zero.
IsInAutoDrawSet (inherited from XNACS1Primitive) Determines if this primitive is in the AutoDrawSet.
LeftOf (inherited from XNACS1Primitive) Returns if the center of this primitive is "to the left" (in x) in relation to the center of otherPrimtive
RemoveFromAutoDrawSet (inherited from XNACS1Primitive) Remove this primitive from the AutoDrawSet. After this function call, this primitive will not be drawn in the application window.
RightOf (inherited from XNACS1Primitive) Returns if the center of this primitive is "to the right" (in x) in relation to the center of otherPrimitive
SetTextureSpriteAnimationFrames (inherited from XNACS1Primitive) Sets animation parameters for a sprite sheet primitive. Zero-based first frame column for the beginning sprite in the animation sequence. Zero-based first frame row for the beginning sprite in the animation sequence. Zero-based first frame column for the ending sprite in the animation sequence. Zero-based first frame row for the ending sprite in the animation sequence. How many ticks the animation will pause for on each frame. The behavior of the animation loop.
SetTextureSpriteSheet (inherited from XNACS1Primitive) Defines a texture specified for a primitive to behave like a sprite sheet with the specified number of sprites. The default sprite to be drawn is the top left sprite in the sheet. Example: The texture for a given primitive has 16 sprites in it, arranged in a 4 by 4 pattern. By default, all 16 sprites will be displayed, stretched to fit the primitive. Calling this method allows you to specify the number of sprites in the texture. The texture of the sprite sheet to be used. The number of columns in the sprite sheet (number of sprites in a single row). Number of rows in the sprite sheet. The padding between sprites and on the top and left edge.
TopOfAutoDrawSet (inherited from XNACS1Primitive) Make sure this primitive is drawn on top of all other primitives.
TravelPrimitive Overloaded TravelPrimitive for Particles. Moves the particle during each update cycle. This function is automacially called for all visible particle. Default behavior is to move the particle if: . Primitive is visible (invivislble primitive is not updated) . ShouldTravel is true . HasNonZeroVelocity() is true This method moves the particle in the direction of its velocity and also displaces it according to the ParticleTravelMode chosen.

Protected Instance Methods

DrawPrimitive Draws the particle.

Protected Internal Instance Properties

Size (inherited from XNACS1Primitive) Get/Set width/height of the primitive.
SizeX (inherited from XNACS1Primitive) Width of the primitive.
SizeY (inherited from XNACS1Primitive) Height of the primitive. For PrimitiveCircle (diameter), PrimitiveRectangle (height), PrimitiveSet (undefined).

See Also

XNACS1Particle Class | XNACS1Lib Namespace