|
Public Member Functions |
| | Player (const char *meshPlayer1="player1.3ds", const char *meshPlayer2="player2.3ds", const char *meshPlayer3="player3.3ds", const char *meshPlayer4="player4.3ds", int animationTime_=100) |
| | ~Player (void) |
| void | load (const Sys &sys, irr::core::vector3df initialPos, irr::scene::ITriangleSelector *selector, bool isLighted=true, bool isShadowed=false, irr::core::vector3df meshScale_=irr::core::vector3df(0.5, 0.5, 0.5)) |
| void | setKeys (irr::EKEY_CODE keyMoveFront_=irr::KEY_KEY_R, irr::EKEY_CODE keyMoveFront2_=irr::KEY_UP, irr::EKEY_CODE keyMoveBack_=irr::KEY_KEY_F, irr::EKEY_CODE keyMoveBack2_=irr::KEY_DOWN, irr::EKEY_CODE keyStrafeLeft_=irr::KEY_KEY_D, irr::EKEY_CODE keyStrafeLeft2_=irr::KEY_LEFT, irr::EKEY_CODE keyStrafeRight_=irr::KEY_KEY_G, irr::EKEY_CODE keyStrafeRight2_=irr::KEY_RIGHT, irr::EKEY_CODE keyMoveLeft_=irr::KEY_KEY_U, irr::EKEY_CODE keyMoveRight_=irr::KEY_KEY_O, irr::EKEY_CODE keyJump_=irr::KEY_SPACE, irr::EKEY_CODE keyJump2_=irr::KEY_SHIFT) |
| | Set player movement keys.
|
| void | setAbilities (double speedmax_=400.0, double speedmin_=-400.0, double speedmaxlateral_=200.0, double acceleration_=20.0, double deceleration_=20.0, double autoDeceleration_=10.0, double jumpCapacity_=5.0, double gravity_=10.0) |
| | Define player speed and jump, and define the gravity applied on him.
|
| void | setRotationSpeed (double rotationSpeedMouseX_=0.333, double rotationSpeedMouseY_=0.5, double rotationSpeedKeyboardX_=0.5) |
| | Define player speed with mouse and keyboard.
|
| void | setSounds (int idSoundWalk_, int idSoundJump_) |
| | Define sounds. If id is -1, then there is no sound.
|
| void | play (const Sys &sys, irr::scene::ITriangleSelector *selector, const Soundbank &sndbnk) |
| | Detect pressed keys, move player, play sounds.
|
| irr::core::vector3df | getPosition (void) |
| | Get player position.
|
| double | getRadius (void) |
| | Get player node radius.
|
| irr::core::vector3df | getRotation (void) |
| | Get player rotation without X axis (X axis = 0).
|
| irr::core::vector3df | getLookAt (void) |
| | Get player rotation with X axis.
|