Labyrinth
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
Public Types | Public Member Functions | List of all members
LxS::Game::Action Class Reference

Actions are enqueued by UI or AI agents and are processed by game objects in appropriate order. More...

#include <action.hpp>

Collaboration diagram for LxS::Game::Action:
Collaboration graph

Public Types

enum  {
  MOVE, ATTACK, POTION, FOLLOW,
  ESCAPE, SURPRISED
}
 

Public Member Functions

 Action (int atype)
 constructor. correct type of action must be given
 
int GetType ()
 return type of action
 
const char * GetTypeAsString ()
 stringified type of action (for UI)
 
void SetTarget (GameObject *go)
 if target of action is an object
 
void SetTarget (float x, float y, float z)
 if target is set of coordinates
 
float GetActionTime ()
 return total time for execution of action in battle mode
 
float GetTX ()
 
float GetTY ()
 
float GetTZ ()
 
GameObjectGetTObj ()
 

Detailed Description

Actions are enqueued by UI or AI agents and are processed by game objects in appropriate order.

Member Enumeration Documentation

anonymous enum
Enumerator
MOVE 

exploration mode only = params: coordinates

ATTACK 

battle mode only = params: game object (character to attack)

POTION 

each mode = params: game object (item to consume)

FOLLOW 

Exploration mode, for AI only = params: game object to follow.

ESCAPE 

leave combat mode = no params (or maybe a target set of coordinates?)

SURPRISED 

In battle mode.

Member Function Documentation

GameObject* LxS::Game::Action::GetTObj ( )
inline

get target game object (works only if target was given as a game object)

float LxS::Game::Action::GetTX ( )
inline

get target coordinate X (works only if target was given as a set of coordinates)

float LxS::Game::Action::GetTY ( )
inline

get target coordinate Y (works only if target was given as a set of coordinates)

float LxS::Game::Action::GetTZ ( )
inline

get target coordinate Z (works only if target was given as a set of coordinates)


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