Contains all configurable gameplay parameters of any MovingObject. More...
#include <ObjectDef.h>
Public Attributes | |
ObjectTypes | type |
the type of the object, one of the ObjectTypes enum values | |
NSString * | imageFileName |
the image file for this object | |
NSString * | proximityWarningFileName |
the image file for the proximity warning used by this object | |
ImageOrientations | imageOrientation |
define how the image is oriented, Right means the sprite image is oriented to the right, Up to top, etc. | |
float | speed |
how fast the object moves, good values are in range 5-40 | |
float | rotationSpeed |
how fast the object will rotate to face the direction it is moving to, it's in fractions of a second, a good value is 0.5f | |
float | touchRadius |
how big the touch area of the object is where it recognizes a touch, typically twice the size of the collision radius | |
float | collisionRadius |
how big the collision radius is, if anything gets closer than collisionRadius pixels the object will collide (crash) |
Contains all configurable gameplay parameters of any MovingObject.
how big the collision radius is, if anything gets closer than collisionRadius pixels the object will collide (crash)
NSString* ObjectDef::imageFileName |
the image file for this object
define how the image is oriented, Right means the sprite image is oriented to the right, Up to top, etc.
If you notice that your images are rotated at 90 degrees or backwards compared to the movement direction then you need to adjust this property and set the correct orientation for your images. I assume most images are drawn pointing upwards so the most commonly used value will be ImageOrientationUp.
NSString* ObjectDef::proximityWarningFileName |
the image file for the proximity warning used by this object
float ObjectDef::rotationSpeed |
how fast the object will rotate to face the direction it is moving to, it's in fractions of a second, a good value is 0.5f
float ObjectDef::speed |
how fast the object moves, good values are in range 5-40
float ObjectDef::touchRadius |
how big the touch area of the object is where it recognizes a touch, typically twice the size of the collision radius
the type of the object, one of the ObjectTypes enum values