GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Public Types | Public Member Functions | List of all members

Events that can be generated as a stand-alone function, and used as a condition, action or expression. More...

#include <EventsFunction.h>

Public Types

enum  FunctionType { Action, Condition, Expression, StringExpression }
 

Public Member Functions

EventsFunctionClone () const
 Return a pointer to a new EventsFunction constructed from this one.
 
const gd::StringGetDescription () const
 Get the description of the function, that is displayed in the editor.
 
EventsFunctionSetDescription (const gd::String &description_)
 Set the description of the function, to be displayed in the editor.
 
const gd::StringGetName () const
 Get the name of the function, to be used for the action/condition/expression name.
 
EventsFunctionSetName (const gd::String &name_)
 Set the name of the function, to be used for the action/condition/expression name.
 
const gd::StringGetFullName () const
 Get the name of the function, that is displayed in the editor.
 
EventsFunctionSetFullName (const gd::String &fullName_)
 Set the name of the function, to be displayed in the editor.
 
const gd::StringGetSentence () const
 Get the sentence of the function, that is used for the condition/action in the Events Editor.
 
EventsFunctionSetSentence (const gd::String &sentence_)
 Set the sentence of the function, to be used for the condition/action in the Events Editor.
 
EventsFunctionSetFunctionType (FunctionType type)
 Set the type of the function.
 
FunctionType GetFunctionType () const
 Get the type of the function.
 
const gd::EventsListGetEvents () const
 Return the events.
 
gd::EventsListGetEvents ()
 Return the events.
 
const std::vector
< gd::ParameterMetadata > & 
GetParameters () const
 Return the parameters of the function. More...
 
std::vector
< gd::ParameterMetadata > & 
GetParameters ()
 Return the parameters.
 
ObjectGroupsContainerGetObjectGroups ()
 Return a reference to the object groups that can be used in the function.
 
const ObjectGroupsContainerGetObjectGroups () const
 Return a const reference to the object groups that can be used in the function.
 
Serialization
void SerializeTo (gd::SerializerElement &element) const
 Serialize the EventsFunction to the specified element.
 
void UnserializeFrom (gd::Project &project, const gd::SerializerElement &element)
 Load the EventsFunction from the specified element.
 

Detailed Description

Events that can be generated as a stand-alone function, and used as a condition, action or expression.

Note
The code generation can be done using gd::EventsCodeGenerator
The conversion to an extension is not in GDCore and should be done by the IDE (see EventsFunctionsExtensionsLoader)

Member Function Documentation

const std::vector<gd::ParameterMetadata>& gd::EventsFunction::GetParameters ( ) const
inline

Return the parameters of the function.

Note
During code/extension generation, new parameters are added to the generated function, like "runtimeScene" and "eventsFunctionContext". This should be transparent to the user.

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