CEL

Public API Reference

iPcActorAnalog Struct Reference

This is a property class for analog character movement using a joystick or analog pad. More...

#include <propclass/actoranalog.h>

Inheritance diagram for iPcActorAnalog:

List of all members.

Public Member Functions

virtual void AddAxis (size_t axis, float value)=0
 Increase axis by a value.
virtual float GetAxis (size_t axis) const =0
 Get an axis' value.
virtual float GetMovementAcceleration () const =0
 Get the movement acceleration of the character for when you start moving.
virtual float GetMovementDeceleration () const =0
 Get the movement deceleration of the character for when you stop moving.
virtual float GetMovementSpeed () const =0
 Get the movement speed of the character.
virtual float GetTurningSpeed () const =0
 Get the turning speed of the character.
virtual void SetAxis (size_t axis, float value)=0
 Set axis to a value.
virtual void SetMovementAcceleration (float moveaccel)=0
 Set the movement acceleration of the character for when you start moving.
virtual void SetMovementDeceleration (float movedecel)=0
 Set the movement deceleration of the character for when you stop moving.
virtual void SetMovementSpeed (float movespeed)=0
 Set the movement speed of the character.
virtual void SetTurningSpeed (float turnspeed)=0
 Set the turning speed of the character.

Detailed Description

This is a property class for analog character movement using a joystick or analog pad.

This property class supports the following actions (add prefix 'cel.action.' to get the ID of the action and add prefix 'cel.parameter.' to get the ID of the parameter):

This property class supports the following properties (add prefix 'cel.property.' to get the ID of the property:

Definition at line 45 of file actoranalog.h.


Member Function Documentation

virtual void iPcActorAnalog::AddAxis ( size_t  axis,
float  value 
) [pure virtual]

Increase axis by a value.

This is for keyboard keys to avoid 'deadlock'

Parameters:
axis This is the axis. 0 for left/right axis, 1 for forwards/backwards axis, 2 or above for both together.
value The value to add to it. Anything resulting in the target axis value being out of the range [-1,1] will be clipped.
virtual float iPcActorAnalog::GetAxis ( size_t  axis  )  const [pure virtual]

Get an axis' value.

Parameters:
axis This is the axis. 0 for left/right axis, 1 for forwards/backwards axis.
value The value in the range [-1,1].
virtual float iPcActorAnalog::GetMovementAcceleration (  )  const [pure virtual]

Get the movement acceleration of the character for when you start moving.

Returns:
Acceleration of character.
virtual float iPcActorAnalog::GetMovementDeceleration (  )  const [pure virtual]

Get the movement deceleration of the character for when you stop moving.

Returns:
Deceleration of character.
virtual float iPcActorAnalog::GetMovementSpeed (  )  const [pure virtual]

Get the movement speed of the character.

Returns:
How fast the character moves in the direction its facing.
virtual float iPcActorAnalog::GetTurningSpeed (  )  const [pure virtual]

Get the turning speed of the character.

Returns:
How fast turns to face its target.
virtual void iPcActorAnalog::SetAxis ( size_t  axis,
float  value 
) [pure virtual]

Set axis to a value.

Parameters:
axis This is the axis. 0 for left/right axis, 1 for forwards/backwards axis, 2 or above for both together.
value The value in the range [-1,1] to set it to. Anything else is invalid and is clipped.
virtual void iPcActorAnalog::SetMovementAcceleration ( float  moveaccel  )  [pure virtual]

Set the movement acceleration of the character for when you start moving.

Parameters:
moveaccel Acceleration of character.
virtual void iPcActorAnalog::SetMovementDeceleration ( float  movedecel  )  [pure virtual]

Set the movement deceleration of the character for when you stop moving.

Parameters:
movedecel Deceleration of character.
virtual void iPcActorAnalog::SetMovementSpeed ( float  movespeed  )  [pure virtual]

Set the movement speed of the character.

Parameters:
movespeed How fast the character moves in the direction its facing.
virtual void iPcActorAnalog::SetTurningSpeed ( float  turnspeed  )  [pure virtual]

Set the turning speed of the character.

Parameters:
turnspeed How fast turns to face its target.

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

Generated for CEL: Crystal Entity Layer 1.4.1 by doxygen 1.7.1