C4 Engine Terathon Software C4 Engine API Documentation

• Controller System

API Links
Developer Links

class Method

Defined in:  C4Scripts.h
The Method class represents an action that can be placed in a script.
Definition

class Method : public GraphNode<Method, Fiber>, public Completable<Method>, public Registrable<Method, MethodRegistration>,

public Packable, public Configurable, public Memory<ScriptState>

Member Functions
Method::GetMethodType Returns the method type.
Method::GetTargetNode Returns the target node for a method.
Method::SetMethodResult Sets the boolean result for a method.
Method::SetOutputValue Sets the output value for a method.
Method::Execute Executes a script method.
Method::Resume Resumes a script method after a saved game is loaded.
Method::Stop Stops execution along the path containing a method.
Constructor

Method(MethodType type = kMethodNull);

Parameters
type The method type.
Description
The Method class is the base class for all classes representing an action that can be placed in a script.
Base Classes
GraphNode<Method, Fiber> Methods are stored in a directed graph to make up a script.
Completable<Method> A method calls its completion procedure when it finishes executing.
Registrable<Method, MethodRegistration> Custom method types can be registered with the engine.
Packable Methods can be packed for storage in resources.
Configurable Methods can define configurable parameters that are exposed as user interface elements in the Script Editor.
Memory<ScriptState> Script methods are stored in a dedicated heap.
See Also
MethodReg