CEL

Public API Reference

iPcActorMove Struct Reference

ActorMove property class. More...

#include <propclass/actormove.h>

Inheritance diagram for iPcActorMove:

List of all members.

Public Member Functions

virtual void AutoRun (bool start)=0
 Start/stop auto-running.
virtual void Backward (bool start)=0
 Start/stop going backward.
virtual void EnableMouseMove (bool en)=0
 Enable mouse move.
virtual void Forward (bool start)=0
 Start/stop going forward.
virtual float GetJumpingVelocity () const =0
 Get the jumping velocity (default 6.31).
virtual float GetMouseMoveSpeedX () const =0
 Get mouse move x factor.
virtual float GetMouseMoveSpeedY () const =0
 Get mouse move y factor.
virtual float GetMovementSpeed () const =0
 Get the movement speed (default 2.0).
virtual float GetRotationSpeed () const =0
 Get the rotation speed (default 1.75).
virtual float GetRunningSpeed () const =0
 Get the running speed (default 5.0).
virtual bool IsAutoRunning ()=0
 Returns the toggle value of autorunning.
virtual bool IsMouseMoveAccelerated () const =0
 Test if mouse move is accelerated.
virtual bool IsMouseMoveEnabled () const =0
 Test if mouse move is enabled.
virtual bool IsMouseMoveInverted () const =0
 Test if mouse move is inverted.
virtual bool IsMoving ()=0
 Returns the toggle value of moving.
virtual bool IsMovingBackward ()=0
 Returns the toggle value of moving backward.
virtual bool IsMovingForward ()=0
 Returns the toggle value of moving forward.
virtual bool IsRotatingLeft ()=0
 Returns the toggle value of rotating left.
virtual bool IsRotatingRight ()=0
 Returns the toggle value of rotating right.
virtual bool IsRunning ()=0
 Returns the toggle value of running.
virtual bool IsStrafingLeft ()=0
 Returns the toggle value of strafing left.
virtual bool IsStrafingRight ()=0
 Returns the toggle value of strafing right.
virtual void Jump ()=0
 Jump.
virtual void MouseMove (float x, float y)=0
 Handle mouse movement.
virtual void RotateLeft (bool start)=0
 Start/stop rotating left.
virtual void RotateRight (bool start)=0
 Start/stop rotating right.
virtual void RotateTo (float yrot)=0
 Rotate to a specified angle.
virtual void Run (bool start)=0
 Start/stop running.
virtual void SetAnimation (const char *name, bool cycle=true)=0
 Set current animation on underlying pcmesh.
virtual void SetAnimationMapping (celAnimationName idx, const char *name)=0
 Set the mesh's animationname for internally used animations.
virtual void SetJumpingVelocity (float speed)=0
 Set the jumping velocity (default 6.31).
virtual void SetMouseMoveAccelerated (bool en)=0
 Enable mouse move accelerated mode.
virtual void SetMouseMoveInverted (bool en)=0
 Enable mouse move inverted mode.
virtual void SetMouseMoveSpeed (float xs, float ys)=0
 Set mouse move speed factor.
virtual void SetMovementSpeed (float speed)=0
 Set the movement speed (default 2.0).
virtual void SetRotationSpeed (float speed)=0
 Set the rotation speed (default 1.75).
virtual void SetRunningSpeed (float speed)=0
 Set the running speed (default 5.0).
virtual void StrafeLeft (bool start)=0
 Start/stop strafing left.
virtual void StrafeRight (bool start)=0
 Start/stop strafing right.
virtual void SubscribeMessages ()=0
 By default this property class will depend on the behaviour to listen to the pccommandinput property class and then call the right functions here.
virtual void ToggleCameraMode ()=0
 Toggle camera mode.

Detailed Description

ActorMove property class.

This property class makes a connection between pclinmove and pccamera and makes it easier to control movement for actors in a game. Typical usage would be to combine it with pccommandinput and then in the behaviour layer send out the appropriate calls here depending on the keys that are pressed. This class is also aware of animation actions using animated meshes. Note! Since behaviours are deprecated this property class can now also listen to messages from pclinmove directly.

This property class supports the following actions (add prefix 'cel.move.actor.action.' if you want to access this action through a message):

This property class supports the following properties:

Definition at line 78 of file actormove.h.


Member Function Documentation

virtual void iPcActorMove::AutoRun ( bool  start  )  [pure virtual]

Start/stop auto-running.

virtual void iPcActorMove::Backward ( bool  start  )  [pure virtual]

Start/stop going backward.

virtual void iPcActorMove::EnableMouseMove ( bool  en  )  [pure virtual]

Enable mouse move.

To use this the behaviour must call 'MouseMove()' whenever the mouse moves.

virtual void iPcActorMove::Forward ( bool  start  )  [pure virtual]

Start/stop going forward.

virtual float iPcActorMove::GetJumpingVelocity (  )  const [pure virtual]

Get the jumping velocity (default 6.31).

virtual float iPcActorMove::GetMouseMoveSpeedX (  )  const [pure virtual]

Get mouse move x factor.

virtual float iPcActorMove::GetMouseMoveSpeedY (  )  const [pure virtual]

Get mouse move y factor.

virtual float iPcActorMove::GetMovementSpeed (  )  const [pure virtual]

Get the movement speed (default 2.0).

virtual float iPcActorMove::GetRotationSpeed (  )  const [pure virtual]

Get the rotation speed (default 1.75).

virtual float iPcActorMove::GetRunningSpeed (  )  const [pure virtual]

Get the running speed (default 5.0).

virtual bool iPcActorMove::IsAutoRunning (  )  [pure virtual]

Returns the toggle value of autorunning.

virtual bool iPcActorMove::IsMouseMoveAccelerated (  )  const [pure virtual]

Test if mouse move is accelerated.

virtual bool iPcActorMove::IsMouseMoveEnabled (  )  const [pure virtual]

Test if mouse move is enabled.

virtual bool iPcActorMove::IsMouseMoveInverted (  )  const [pure virtual]

Test if mouse move is inverted.

virtual bool iPcActorMove::IsMoving (  )  [pure virtual]

Returns the toggle value of moving.

virtual bool iPcActorMove::IsMovingBackward (  )  [pure virtual]

Returns the toggle value of moving backward.

virtual bool iPcActorMove::IsMovingForward (  )  [pure virtual]

Returns the toggle value of moving forward.

virtual bool iPcActorMove::IsRotatingLeft (  )  [pure virtual]

Returns the toggle value of rotating left.

virtual bool iPcActorMove::IsRotatingRight (  )  [pure virtual]

Returns the toggle value of rotating right.

virtual bool iPcActorMove::IsRunning (  )  [pure virtual]

Returns the toggle value of running.

virtual bool iPcActorMove::IsStrafingLeft (  )  [pure virtual]

Returns the toggle value of strafing left.

virtual bool iPcActorMove::IsStrafingRight (  )  [pure virtual]

Returns the toggle value of strafing right.

virtual void iPcActorMove::Jump (  )  [pure virtual]

Jump.

virtual void iPcActorMove::MouseMove ( float  x,
float  y 
) [pure virtual]

Handle mouse movement.

Use this in combination with EnableMouseMove(). Note that you should set screenspace property to false in pccommandinput to get the right coordinates (i.e. coordinates centered around 0,0 being the center of the screen).

virtual void iPcActorMove::RotateLeft ( bool  start  )  [pure virtual]

Start/stop rotating left.

virtual void iPcActorMove::RotateRight ( bool  start  )  [pure virtual]

Start/stop rotating right.

virtual void iPcActorMove::RotateTo ( float  yrot  )  [pure virtual]

Rotate to a specified angle.

virtual void iPcActorMove::Run ( bool  start  )  [pure virtual]

Start/stop running.

virtual void iPcActorMove::SetAnimation ( const char *  name,
bool  cycle = true 
) [pure virtual]

Set current animation on underlying pcmesh.

virtual void iPcActorMove::SetAnimationMapping ( celAnimationName  idx,
const char *  name 
) [pure virtual]

Set the mesh's animationname for internally used animations.

virtual void iPcActorMove::SetJumpingVelocity ( float  speed  )  [pure virtual]

Set the jumping velocity (default 6.31).

virtual void iPcActorMove::SetMouseMoveAccelerated ( bool  en  )  [pure virtual]

Enable mouse move accelerated mode.

In this mode the movement will be accelerated in case the mouse moves a lot. This allows for more accurate aiming because small movement don't cause a lot of movement. By default this is disabled.

virtual void iPcActorMove::SetMouseMoveInverted ( bool  en  )  [pure virtual]

Enable mouse move inverted mode.

In this mode the up-down mousemove will be inverted. By default this is disabled.

virtual void iPcActorMove::SetMouseMoveSpeed ( float  xs,
float  ys 
) [pure virtual]

Set mouse move speed factor.

Default is 1,1.

virtual void iPcActorMove::SetMovementSpeed ( float  speed  )  [pure virtual]

Set the movement speed (default 2.0).

virtual void iPcActorMove::SetRotationSpeed ( float  speed  )  [pure virtual]

Set the rotation speed (default 1.75).

virtual void iPcActorMove::SetRunningSpeed ( float  speed  )  [pure virtual]

Set the running speed (default 5.0).

virtual void iPcActorMove::StrafeLeft ( bool  start  )  [pure virtual]

Start/stop strafing left.

virtual void iPcActorMove::StrafeRight ( bool  start  )  [pure virtual]

Start/stop strafing right.

virtual void iPcActorMove::SubscribeMessages (  )  [pure virtual]

By default this property class will depend on the behaviour to listen to the pccommandinput property class and then call the right functions here.

If you call this function this property class will itself listen to the correct messages. This property class will listen to the following messages:

  • cel.input.forward.down
  • cel.input.forward.up
  • cel.input.backward.down
  • cel.input.backward.up
  • cel.input.rotateleft.down
  • cel.input.rotateleft.up
  • cel.input.rotateright.down
  • cel.input.rotateright.up
  • cel.input.jump.down
  • cel.input.cammode.down
virtual void iPcActorMove::ToggleCameraMode (  )  [pure virtual]

Toggle camera mode.


The documentation for this struct was generated from the following file:

Generated for CEL: Crystal Entity Layer 2.1 by doxygen 1.6.1