AppEasy Core SDK  1.5.0
Cross platform mobile and desktop app and game development SDK - The easy way to make apps
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines
CzXomlActions_Script Class Reference

Implements actions that relate to scripts. More...

#include <CzActionsScript.h>

Inheritance diagram for CzXomlActions_Script:
IzXomlAction

List of all members.

Public Types

enum  eActionType { Action_CallScript = 0, Action_Inline = 1, Action_CallGlobalScript = 2, Action_Max = 3 }

Public Member Functions

 CzXomlActions_Script (eActionType type)
void Execute (IzXomlResource *source, CzAction *action)
 The main actions executor for script related actions. All script specific actions such as CallScript are implemented by this method.

Protected Member Functions

 CzXomlActions_Script ()

Protected Attributes

eActionType Type

Detailed Description

Implements actions that relate to scripts.

The CzXomlActions_Script class holds Actions (IzXomlAction) that deal with scripts such as CallScript

The following actions are supported:

  • CallScript
  • Inline
  • CallGlobalScript

The above actions have the following XOML prototypes:

  • CallScript(script-function-name, context-name, param2, param3, param4)
    • script-function-name - Script function name to call (must be in scene or global scope)
    • context-name - Scene or actor that should be passed as the first parameter to the script function. If not set then the actor or scene that the action is defined inside of will be passed.
    • Param2 to Param4 - Passed as the 2nd, 3rd and 4th parameters of the function (all optional)
  • Inline(script-code, scene-name)
    • script-code - Script code snipit to execute
    • scene-name - Name of scene that contains the script engine that should execute the script. By not passing this parameter the scene that contains the action will be used. If the action is declared outside of a scene then the global script engine will be used.
  • CallGlobalScript(script-function-name, context-name, param2, param3, param4)
    • script-function-name - Global script function name to call
    • Scene that should be passed as the first parameter to the script function. If not set then the main game object will be passed.
    • Param2 to Param4 - Passed as the 2nd, 3rd and 4th parameters of the function (all optional)

For more information on scripting see CzScript and IzScriptEngine


Member Enumeration Documentation

Enumerator:
Action_CallScript 
Action_Inline 
Action_CallGlobalScript 
Action_Max 

Constructor & Destructor Documentation


Member Function Documentation

void CzXomlActions_Script::Execute ( IzXomlResource source,
CzAction action 
) [virtual]

The main actions executor for script related actions. All script specific actions such as CallScript are implemented by this method.

Parameters:
[in]source- The source of the action
[in]action- The action to execute

Implements IzXomlAction.


Member Data Documentation


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