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_SCENE_H_) 00015 #define _CZ_ACTIONS_SCENE_H_ 00016 00017 #include "CzActions.h" 00018 #include "CzXoml.h" 00019 00020 /** 00021 @addtogroup Actions 00022 @{ 00023 */ 00024 00025 /** 00026 @class CzXomlActions_Scene 00027 00028 @brief Implements actions that relate to scenes 00029 00030 The CzXomlActions_Scene class holds Actions (IzXomlAction) that deal with scenes such as ChangeScene 00031 00032 The following actions are supported: 00033 - CallActions 00034 - SetCurrentScene 00035 - BringtSceneToFront 00036 - ChangeScene 00037 - SuspendScene 00038 - ResumeScene 00039 - HideScene 00040 - ShowScene 00041 - KillScene 00042 - KillAllScenes 00043 - SetAllSceneTimelines 00044 00045 The above actions have the following XOML prototypes: 00046 - CallActions(actions-list-name, parent-actor-name (optional), parent-scene-name (optional)) 00047 - actions-list-name - Name of actions list to call 00048 - parent-actor-name - Actor that contains the actions list, if left out then the actor that contains this action will be used 00049 - parent-scene-name - Scene that contains the actions list, if left out then the scene that contains this action will be used. If parent-actor-name is 00050 specified then parent-scene-name becomes the actors container scene. If parent-actor-name and parent-scene-name are not set then global actions list 00051 will be searched. 00052 - SetCurrentScene(scene-name) 00053 - scene-name - Target scene name 00054 - BringtSceneToFront(scene-name) 00055 - scene-name - Target scene name 00056 - ChangeScene(scene-name) 00057 - scene-name - Target scene name 00058 - SuspendScene(scene-name) 00059 - scene-name - Target scene name (uses container scene if not specified) 00060 - ResumeScene(scene-name) 00061 - scene-name - Target scene name (uses container scene if not specified) 00062 - HideScene(scene-name) 00063 - scene-name - Target scene name (uses container scene if not specified) 00064 - ShowScene(scene-name) 00065 - scene-name - Target scene name (uses container scene if not specified) 00066 - KillScene(scene-name) 00067 - scene-name - Target scene name (uses container scene if not specified) 00068 - KillAllScenes(scene-name) 00069 - scene-name - Scene to exclude 00070 - SetAllSceneTimelines(timeline-name) 00071 - timeline-name - Name of timeline to assign to all scenes 00072 00073 For more information on scenes see CzScene 00074 00075 */ 00076 class CzXomlActions_Scene : public IzXomlAction 00077 { 00078 public: 00079 enum eActionType 00080 { 00081 Action_CallActions = 0, 00082 Action_SetCurrentScene = 1, 00083 Action_BringtSceneToFront = 2, 00084 Action_ChangeScene = 3, 00085 Action_SuspendScene = 4, 00086 Action_ResumeScene = 5, 00087 Action_HideScene = 6, 00088 Action_ShowScene = 7, 00089 Action_KillScene = 8, 00090 Action_KillAllScenes = 9, 00091 Action_SetAllSceneTimelines = 10, 00092 Action_Max = 11 00093 }; 00094 protected: 00095 eActionType Type; 00096 CzXomlActions_Scene() {} 00097 public: 00098 CzXomlActions_Scene(eActionType type) 00099 { 00100 Type = type; 00101 switch (Type) 00102 { 00103 case Action_CallActions: 00104 setActionName("callactions"); 00105 break; 00106 case Action_SetCurrentScene: 00107 setActionName("setcurrentscene"); 00108 break; 00109 case Action_BringtSceneToFront: 00110 setActionName("bringscenetofront"); 00111 break; 00112 case Action_ChangeScene: 00113 setActionName("changescene"); 00114 break; 00115 case Action_SuspendScene: 00116 setActionName("suspendscene"); 00117 break; 00118 case Action_ResumeScene: 00119 setActionName("resumescene"); 00120 break; 00121 case Action_HideScene: 00122 setActionName("hidescene"); 00123 break; 00124 case Action_ShowScene: 00125 setActionName("showscene"); 00126 break; 00127 case Action_KillScene: 00128 setActionName("killscene"); 00129 break; 00130 case Action_KillAllScenes: 00131 setActionName("killallscenes"); 00132 break; 00133 case Action_SetAllSceneTimelines: 00134 setActionName("setallscenetimelines"); 00135 break; 00136 } 00137 } 00138 void Execute(IzXomlResource* source, CzAction* action); 00139 }; 00140 00141 /// @} 00142 00143 #endif // _CZ_ACTIONS_SCENE_H_