![]() |
AppEasy Core SDK
1.5.0
Cross platform mobile and desktop app and game development SDK - The easy way to make apps
|
A collection of actions (called an actions list in XOML). More...
#include <CzActions.h>
Public Types | |
typedef CzList< CzAction * > ::iterator | _Iterator |
Public Member Functions | |
_Iterator | begin () |
_Iterator | end () |
void | addAction (CzAction *action) |
void | removeAction (CzAction *action, bool auto_delete=true) |
void | setConditions (const CzString &conditions) |
unsigned int | getConditions () const |
void | setNot (bool _not) |
bool | isNot () const |
CzActions () | |
virtual | ~CzActions () |
void | Execute (IzXomlResource *source) |
int | LoadFromXoml (IzXomlResource *parent, bool load_children, CzXmlNode *node) |
Protected Attributes | |
CzList< CzAction * > | Actions |
unsigned int | Conditions |
CzString | _Conditions |
bool | Not |
A collection of actions (called an actions list in XOML).
XOML allows you to collect together a collection of actions that are executed one after the other. Below is an example that shows how to create an actions list in XOML:
<!-- Action that is called when a correct answer is given --> <Actions Name="CorrectAnswer"> <Action Method="AddVar" Param1="RoundScore" Param2="1" /> <Action Method="HideActor" Param1="SelectedCardNames:0" /> <Action Method="HideActor" Param1="SelectedCardNames:1" /> <Action Method="HideActor" Param1="SelectedCardNames:2" /> <Action Method="AddVar" Param1="CardsFoundCount" Param2="3" /> <Action Method="SetProperty" Param1="Text" Param2="Correct, well done" Param3="AnswerNotification" /> <Action Method="SetTimeline" Param1="AnswerNotificationAnim" Param2="AnswerNotification" /> </Actions>
In code to create an actions list is a simple case of instantiating a CzActions class then calliong addAction() to add actions to the actions list. When the actions list is built you can then add it to either the global resources actions manager, a scenes actions manager or an actors actions manager depending on what scope you would like the actions list to have. Its possible for example to add the actions list to a scene then apply it to multiple actors.
typedef CzList<CzAction*>::iterator CzActions::_Iterator |
CzActions::CzActions | ( | ) | [inline] |
virtual CzActions::~CzActions | ( | ) | [inline, virtual] |
void CzActions::addAction | ( | CzAction * | action | ) |
_Iterator CzActions::begin | ( | ) | [inline] |
_Iterator CzActions::end | ( | ) | [inline] |
void CzActions::Execute | ( | IzXomlResource * | source | ) |
unsigned int CzActions::getConditions | ( | ) | const [inline] |
bool CzActions::isNot | ( | ) | const [inline] |
int CzActions::LoadFromXoml | ( | IzXomlResource * | parent, |
bool | load_children, | ||
CzXmlNode * | node | ||
) | [virtual] |
Implements IzXomlResource.
void CzActions::removeAction | ( | CzAction * | action, |
bool | auto_delete = true |
||
) |
void CzActions::setConditions | ( | const CzString & | conditions | ) | [inline] |
void CzActions::setNot | ( | bool | _not | ) | [inline] |
CzString CzActions::_Conditions [protected] |
CzList<CzAction*> CzActions::Actions [protected] |
unsigned int CzActions::Conditions [protected] |
bool CzActions::Not [protected] |