The properties of the TAgkSprite class are listed here.
|
Name |
Description |
![]() |
Whether this sprite updates its animation and physics every frame. | |
![]() |
The alpha component of the sprite color, ranging from 0 (fully transparent) to 255 (fully opaque) | |
![]() |
The current rotation angle of the sprite in degrees, 0 degrees being the direction x=0 y=-1 (12 o'clock) and proceeding clockwise. | |
![]() |
The current rotation angle of the sprite in radians, 0 radians being the direction x=0 y=-1 (12 o'clock) and proceeding clockwise. | |
![]() ![]() |
Assigns the sprite to zero or more categories for collision filtering (physics and non physics). | |
![]() ![]() |
Uses a bitwise mask to determine which sprites this sprite can collide with. | |
![]() ![]() |
The color of the sprite | |
![]() |
The current frame in the sprite animation. | |
![]() |
The current depth of the sprite in the range 0-10000, with 0 being the front of the screen and 10000 being the back. | |
![]() ![]() |
Whether the sprite is fixed to the screen. | |
![]() ![]() |
The total number of frames the sprite managed to get from its image. | |
![]() |
Assigns this sprite to a group for filtering collisions (physics or non physics). | |
![]() ![]() |
The current height of the sprite as a floating point value. | |
![]() |
The image currently assigned to the sprite. | |
![]() ![]() |
Sets some damping on the sprite's angular movement which may simulate something like wind resistance. | |
![]() ![]() |
Similar to a torque force, but applied only once. | |
![]() |
The angular velocity of the sprite in radians per second. This is the speed at which the sprite is currently rotating. | |
![]() ![]() |
Sets whether the physics simulation is allowed to rotate the sprite in response to collisions. | |
![]() ![]() |
Sets some damping on the sprite's linear movement which may simulate something like wind resistance. | |
![]() ![]() |
Whether physics is enabled for this sprite. | |
![]() ![]() |
Sets the friction value to use for this sprite during physics calculations. Should be in the range 0-1. | |
![]() ![]() |
Set this to True if the sprite is likely to be moving very fast, like a bullet, as it will then be checked more thoroughly for collision with other dynamic sprites, using this unnecessarily will affect performance. | |
![]() ![]() |
Set this to True to make the sprite a sensor object. | |
![]() |
The mass of the sprite in kilograms currently being used. This was either generated automatically when its shape was created or a shape was added, or was set manually. | |
![]() ![]() |
Sets the sprite up for automatic collision using the built physics system. Sets the mode to use for physics. Once you have set a sprite to be controlled by physics you should use SetPosition and Angle sparingly as these will interrupt the physics motion of the sprite. You can also use the SetPhysicsVelocity and PhysicsAngularVelocity to change the speed and direction of a sprite, but again these will interfere with the physics motion of the sprite. If you wish to influence the position or rotation of a physics sprite you should use the force and torque (rotational force) functions where possible, these will maintain... more | |
![]() ![]() |
Sets the restitution (bounciness) value to use for this sprite during physics calculations. Should be in the range 0-1. | |
![]() ![]() |
Applies a torque to the rotation of the sprite, similar to applying a force to its movement. | |
![]() ![]() |
Returns the linear velocity of the sprite. | |
![]() ![]() |
Returns the linear velocity of the sprite in the X direction. | |
![]() ![]() |
Returns the linear velocity of the sprite in the Y direction. | |
![]() ![]() |
Whether the sprite is currently playing an animation. | |
![]() ![]() |
The current position of the sprite's top left corner in world coordinates. | |
![]() ![]() |
The current position of the sprite's current offset point in the world. | |
![]() ![]() |
Sets the current shape for use in collision detection, hit testing, and physics. A shape can be set without turning physics on, and by default all sprites are set to use the box shape, which is the fastest to setup. If you select no shape (psNone) then hit tests and collision will return False, and physics will move but not collide the sprite, resulting in it passing through everything. | |
![]() ![]() |
A special render mode that keeps the sprite on whole pixels only so it does not draw itself across pixel boundaries which may cause flickering as the sprite moves across the screen. | |
![]() ![]() |
The sprite animation speed in Frames Per Second. | |
![]() ![]() |
Set the sprite transparency to a particular setting, with a choice of no transparency (tmNone), alpha transparency (tmAlphaTransparency), and alpha masking (on/off transparency, tmAlphaMasking), although alpha masking tends to be slower than full alpha on most devices. | |
![]() ![]() |
Controls how the sprite handles UVs that might extend beyond the bounds of the image during sampling, for example when the edge of the sprite is halfway across a pixel. | |
![]() |
Whether this sprite is visible during drawing. | |
![]() ![]() |
The current width of the sprite as a floating point value. | |
![]() |
The current X coordinate of the sprite's top left corner as a floating point value in world coordinates. When setting this property, it will immediately take effect. | |
![]() ![]() |
The current X coordinate of the sprite's current offset point in the world. | |
![]() |
The current Y coordinate of the sprite's top left corner as a floating point value in world coordinates. When setting this property, it will immediately take effect. | |
![]() ![]() |
The current Y coordinate of the sprite's current offset point in the world. |
Copyright (c) 2012. All rights reserved.
|