RioEngine  0.1
My first attempt to create a 3D WYSIWYG Game Engine
CAction Class Reference

#include <caction.h>

Inheritance diagram for CAction:
CObject CFiniteTimeAction CActionInterval CCallFuncN CDelayTime CMoveTo CRotateTo CScaleTo CSequence CMoveBy CRotateBy CScaleBy

Signals

void onActionStart (CAction *action)
 
void onActionDone (CAction *action)
 

Public Member Functions

 CAction ()
 
CGameObjectgetOriginalTarget () const
 
virtual bool isDone ()
 
virtual void startWithTarget (CGameObject *target)
 
virtual void stop ()
 
virtual void step (float dt)
 
virtual void update (float t)
 
virtual ~CAction ()
 
- Public Member Functions inherited from CObject
 CObject ()
 
 CObject (const CObject &object)
 
CObjectoperator= (const CObject &object)
 
CObjectretain ()
 
unsigned int release () const
 
CObjectautorelease ()
 
unsigned int retainCount () const
 
bool isValidCObject () const
 
virtual ~CObject ()
 

Public Attributes

unsigned int tag
 

Protected Attributes

CGameObjectm_originalTarget
 
CGameObjectm_target
 

Additional Inherited Members

- Static Public Member Functions inherited from CObject
static void safeRetain (void *pointer)
 
template<class T >
static void safeRelease (T *pointer)
 
template<class T >
static void safeReleaseArray (T *array)
 
static void safeRelease (const char *pointer)
 
- Protected Member Functions inherited from CObject
virtual void copyValuesFromObject (const CObject &object)
 

Detailed Description

Base class for CCAction objects.

Definition at line 39 of file caction.h.

Constructor & Destructor Documentation

CAction::CAction ( )

Definition at line 34 of file caction.cpp.

CAction::~CAction ( )
virtual

Definition at line 90 of file caction.cpp.

Member Function Documentation

CGameObject * CAction::getOriginalTarget ( ) const

Definition at line 39 of file caction.cpp.

bool CAction::isDone ( )
virtual

return YES if the action has finished

Reimplemented in CActionInterval.

Definition at line 51 of file caction.cpp.

void CAction::onActionDone ( CAction action)
signal

onActionDone callback

void CAction::onActionStart ( CAction action)
signal

onActionStart callback

void CAction::startWithTarget ( CGameObject target)
virtual

called before the action start. It will also set the target.

Reimplemented in CCallFuncN, CSequence, CScaleBy, CScaleTo, CRotateBy, CRotateTo, CMoveBy, CMoveTo, and CActionInterval.

Definition at line 45 of file caction.cpp.

void CAction::step ( float  dt)
virtual

called every frame with its delta time. DON'T override unless you know what you are doing.

Reimplemented in CActionInterval.

Definition at line 63 of file caction.cpp.

void CAction::stop ( )
virtual

called after the action has finished. It will set the 'target' to nil. IMPORTANT: You should never call "[action stop]" manually. Instead, use: "[target stopAction:action];"

Reimplemented in CSequence.

Definition at line 57 of file caction.cpp.

void CAction::update ( float  t)
virtual

called once per frame. time a value between 0 and 1 For example: 0 means that the action just started 0.5 means that the action is in the middle 1 means that the action is over

Reimplemented in CCallFuncN, CSequence, CScaleTo, CRotateBy, CRotateTo, and CMoveTo.

Definition at line 68 of file caction.cpp.

Member Data Documentation

CGameObject* CAction::m_originalTarget
protected

The original target, since target can be nil.

Definition at line 87 of file caction.h.

CGameObject* CAction::m_target
protected

The "target". The action will modify the target properties. The target will be set with the 'startWithTarget' method. When the 'stop' method is called, target will be set to nil. The target is 'assigned', it is not 'retained'.

Definition at line 95 of file caction.h.

unsigned int CAction::tag

The action tag. An identifier of the action

Definition at line 45 of file caction.h.


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