Inherited by SwigDirector_Person.
Public Member Functions | |
virtual void | collisionWithLayerAreas () |
virtual void | freeze (bool value) |
virtual EntityType | getEntityType () const |
virtual float | getSpeed () const |
virtual bool | isFrozen () const |
virtual void | lookAt (StaticObject *object) |
virtual bool | move (int x, int y, bool force=false) |
Person (const char *name, const char *configFile) | |
virtual void | setControl (PersonControl *personControl) |
virtual void | setInputControl () |
virtual void | setNullControl () |
virtual void | setSampleControl () |
virtual void | setSpeed (float speed) |
virtual void | setStandAnimation (bool forceFromHeading=false) |
virtual bool | stepTo (Point point, bool force=true) |
virtual void | update () |
virtual | ~Person () |
Protected Attributes | |
PersonControl * | control |
bool | frozen |
int | heading |
float | speed |
Static Protected Attributes | |
static const int | squaredInteractDistance = 600 |
Annchienta::Person::Person | ( | const char * | name, | |
const char * | configFile | |||
) |
virtual Annchienta::Person::~Person | ( | ) | [virtual] |
Just another destructor.
virtual void Annchienta::Person::collisionWithLayerAreas | ( | ) | [virtual] |
Checks if this Person collides with any Area in this Layer and executes the associated scipts if needed.
Reimplemented in SwigDirector_Person.
virtual void Annchienta::Person::freeze | ( | bool | value | ) | [virtual] |
Freeze or unfreeze this Person. When a Person is frozen, he will not be able to move, this can be useful in cutscenes.
value | True to freeze, false to unfreeze. |
Reimplemented from Annchienta::StaticObject.
Reimplemented in SwigDirector_Person.
virtual EntityType Annchienta::Person::getEntityType | ( | ) | const [virtual] |
Reimplemented from Annchienta::StaticObject.
Reimplemented in SwigDirector_Person.
virtual float Annchienta::Person::getSpeed | ( | ) | const [virtual] |
virtual bool Annchienta::Person::isFrozen | ( | ) | const [virtual] |
virtual void Annchienta::Person::lookAt | ( | StaticObject * | object | ) | [virtual] |
Set the "stand{north,east,south,west}" animation, depending where the other object is.
object | Object to look at. |
Reimplemented from Annchienta::StaticObject.
Reimplemented in SwigDirector_Person.
virtual bool Annchienta::Person::move | ( | int | x, | |
int | y, | |||
bool | force = false | |||
) | [virtual] |
Relatively move this Person. This function might not move the Person, for example when there's something in the way. To make sure the Person moves, set the force flag to true. When you set the parameter x to 1, this Person will move a distance over the x axis that is equal to getSpeed().
x | Number of steps to move over X axis. | |
y | Number of steps to move over Y axis. | |
force | Ignore all obstructions and move. |
Reimplemented in SwigDirector_Person.
virtual void Annchienta::Person::setControl | ( | PersonControl * | personControl | ) | [virtual] |
Sets a custom PersonControl inctance for this Person.
Reimplemented in SwigDirector_Person.
virtual void Annchienta::Person::setInputControl | ( | ) | [virtual] |
Create an InputPersonControl instance for this Person and let it control this Person.
Reimplemented in SwigDirector_Person.
virtual void Annchienta::Person::setNullControl | ( | ) | [virtual] |
Deletes the PersonControl instance associated with this Person. The Person will now halt.
Reimplemented in SwigDirector_Person.
virtual void Annchienta::Person::setSampleControl | ( | ) | [virtual] |
Create an SamplePersonControl instance for this Person and let it control this Person.
Reimplemented in SwigDirector_Person.
virtual void Annchienta::Person::setSpeed | ( | float | speed | ) | [virtual] |
The speed of a Person defaults to 1.0
speed | The new move speed for this Person. |
Reimplemented in SwigDirector_Person.
virtual void Annchienta::Person::setStandAnimation | ( | bool | forceFromHeading = false |
) | [virtual] |
Set the default standing animation for this Person.
forceFromHeading | When set to true, the "stand{north,south,east,west}" will always be used. |
Reimplemented from Annchienta::StaticObject.
Reimplemented in SwigDirector_Person.
virtual bool Annchienta::Person::stepTo | ( | Point | point, | |
bool | force = true | |||
) | [virtual] |
virtual void Annchienta::Person::update | ( | ) | [virtual] |
Update this Person.
Reimplemented from Annchienta::StaticObject.
Reimplemented in SwigDirector_Person.
PersonControl* Annchienta::Person::control [protected] |
bool Annchienta::Person::frozen [protected] |
int Annchienta::Person::heading [protected] |
float Annchienta::Person::speed [protected] |
const int Annchienta::Person::squaredInteractDistance = 600 [static, protected] |