CSS Logo XNACS1Lib Library Documentation
XNACS1Primitive Properties

Game-Themed Introductory Programming Project   

The properties of the XNACS1Primitive class are listed below. For a complete list of XNACS1Primitive class members, see the XNACS1Primitive Members topic.

Public Instance Properties

Center Center of the primitive.
CenterColor Color at the center of the primitive. (undefined for PrimitiveSet).
CenterX X coordinate of the center position of the primitive.
CenterY Y coordinate of the center position of the primitive.
FrontDirection Sets the front direction of the primitive. Setting FrontDireciton will cause the RotateAngle 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 Annotated text label to be associated with the primitive.
LabelColor Color of the anontated text label.
MaxBound Upper left corner of the primitive.
MinBound Lower left corner of the Primitive.
OutsideColor Color at the primeter of the primitive. (undefined for PrimitiveSet).
RotateAngle 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 Get/Set the speed (magnitude of the Velocity vector) for the velocity.
Texture Texture file name (without the "." or the extension) to cover the primitive.
Velocity Velocity of a primitive. This is a true velocity: with magnitude (speed) and direction for tavel.
VelocityDirection Get/Set the direction of the velocity.
VelocityX Get/Set the x-component of the primitive velocity.
VelocityY Get/Set the y-component of the primitive velocity.
Visible Whether the primitive is visible.

Protected Internal Instance Properties

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

See Also

XNACS1Primitive Class | XNACS1Lib Namespace