#include <ObjectModule.h>
Public Member Functions | |
CPlayer (CObjectModule *m, int id) | |
~CPlayer () | |
Destructor. | |
void | Serialize (CPacket *packet) |
Serializes this player into a packet. | |
void | Deserialize (CPacket *packet) |
Deserializes this player from a packet. | |
int | GetType () |
Returns TYPE_CPLAYER. | |
void | Move (float forward, float left) |
Moves the player by changing its movement factors. Refer to CSpirit::Move. | |
void | Look (float left_radians, float up_radians) |
void | Stop () |
Stops this player. | |
void | Jump () |
Jumps this player. | |
void | SetDirection (Vector3 dir) |
"dir" property setter. See OPSIMUS Scenario Scripting Guide for details. | |
Vector3 | GetDirection () |
"dir" property getter. See OPSIMUS Scenario Scripting Guide for details. | |
void | SetUser (string usr) |
"user" property setter. See OPSIMUS Scenario Scripting Guide for details. | |
string | GetUser () |
"user" property getter. See OPSIMUS Scenario Scripting Guide for details. | |
void | SetJumpSpeed (float v) |
"jumpspeed" property setter. See OPSIMUS Scenario Scripting Guide for details. | |
float | GetJumpSpeed () |
"jumpspeed" property getter. See OPSIMUS Scenario Scripting Guide for details. | |
void | SetOrder (float speed) |
"order" property setter. See OPSIMUS Scenario Scripting Guide for details. | |
void | Update (float seconds) |
Executes the CPlayer for a number of seconds. | |
void | SetFromString (const char *prop, const char *value) |
Derived from CCommon::SetFromString. | |
void | CloneInto (CCommon *c) |
Derived from CCommon::CloneInto. | |
void | Set (const char *prop, object value) |
Derived from CCommon::Set. | |
object | Get (const char *prop) |
Derived from CCommon::Get. |
CPlayer::CPlayer | ( | CObjectModule * | m, | |
int | id | |||
) |
Constructor.
m | The module that this instance is bound to. | |
id | The id of this instance. |
void CPlayer::Look | ( | float | left_radians, | |
float | up_radians | |||
) |
Changes the looking direction of the player.
left_radians | The lateral change in radians to the left direction. | |
up_radians | The vertical change in radians to the up direction. |