![]() |
AppEasy Core SDK
1.5.0
Cross platform mobile and desktop app and game development SDK - The easy way to make apps
|
00001 // 00002 // 00003 // AppEasy SDK - Cross Platform Multi-purpose Game and App Engine 00004 // 00005 // Developed by Matthew Hopwood of Pocketeers Limited - www.pocketeers.co.uk 00006 // 00007 // For updates, tutorials and more details check out www.appeasymobile.com 00008 // 00009 // This code is provided free of charge and without any warranty whatsoever. You must ensure that this whole notice is present in all files and derivatives, so the reader knows its origin. 00010 // If you use this SDK in your product then please ensure that you credit AppEasy's usage appropriately. Please see www.appeasymobile.com for licensing details and support 00011 // 00012 // 00013 00014 #if !defined(_CZ_ACTIONS_VARIABLE_H_) 00015 #define _CZ_ACTIONS_VARIABLE_H_ 00016 00017 #include "CzActions.h" 00018 #include "CzXoml.h" 00019 00020 /** 00021 @addtogroup Actions 00022 @{ 00023 */ 00024 00025 /** 00026 @class CzXomlActions_Variable 00027 00028 @brief Implements actions that are related to XOML variables 00029 00030 The CzXomlActions_Variable class holds Actions (IzXomlAction) that deal with system related functionality such as LoadXOML 00031 00032 The following actions are supported: 00033 - SetVariable 00034 - AddVariable 00035 00036 The above actions have the following XOML prototypes: 00037 - SetVar(variable-name, variable-value, scene-name) 00038 - variable-name - Name of variable 00039 - variable-value - Valeu to assign to the variable 00040 - scene-name - Scene where variable lives (optional) 00041 - SetVar(variable-name, rand, scene-name, min, max) 00042 - variable-name - Name of variable 00043 - rand - “rand”, “randchar” - rand generates a random number, whilst randchar generates a random single character 00044 - scene-name - Scene where variable lives (optional) 00045 - min - Minimum random number / character 00046 - max - Maximum random number / character 00047 - AddVar(variable-name, variable-amount, limit) 00048 - variable-name - Name of variable 00049 - variable-amount - Amount or string to add 00050 - limit - Value limit (optional) 00051 00052 For more information on XOML variables see CzXomlVariable 00053 00054 */ 00055 class CzXomlActions_Variable : public IzXomlAction 00056 { 00057 public: 00058 enum eActionType 00059 { 00060 Action_SetVariable = 0, 00061 Action_AddVariable = 1, 00062 Action_Max = 2, 00063 }; 00064 protected: 00065 eActionType Type; 00066 CzXomlActions_Variable() {} 00067 public: 00068 CzXomlActions_Variable(eActionType type) 00069 { 00070 Type = type; 00071 switch (Type) 00072 { 00073 case Action_SetVariable: 00074 setActionName("setvar"); 00075 break; 00076 case Action_AddVariable: 00077 setActionName("addvar"); 00078 break; 00079 } 00080 } 00081 void Execute(IzXomlResource* source, CzAction* action); 00082 }; 00083 00084 /// @} 00085 00086 #endif // _CZ_ACTIONS_VARIABLE_H_