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 Member Functions | List of all members

Base class used to represents a behavior that can be applied to an object. More...

#include <Behavior.h>

Public Member Functions

virtual BehaviorClone () const
 
const gd::StringGetTypeName () const
 Return the type of the behavior.
 
void SetTypeName (const gd::String &type_)
 Set the type of the behavior.
 
virtual std::map< gd::String,
gd::PropertyDescriptor
GetProperties (const gd::SerializerElement &behaviorContent, gd::Project &project) const
 Called when the IDE wants to know about the custom properties of the behavior. More...
 
virtual bool UpdateProperty (gd::SerializerElement &behaviorContent, const gd::String &name, const gd::String &value, gd::Project &project)
 Called when the IDE wants to update a custom property of the behavior. More...
 
virtual void InitializeContent (gd::SerializerElement &behaviorContent)
 Called to initialize the content with the default properties for the behavior.
 

Detailed Description

Base class used to represents a behavior that can be applied to an object.

See also
gd::BehaviorContent
gd::BehaviorsSharedData

Member Function Documentation

std::map< gd::String, gd::PropertyDescriptor > gd::Behavior::GetProperties ( const gd::SerializerElement behaviorContent,
gd::Project project 
) const
virtual

Called when the IDE wants to know about the custom properties of the behavior.

Implementation example:

std::map<gd::String, gd::PropertyDescriptor> properties;
properties[_("Initial speed")].SetValue(gd::String::From(initialSpeed));
return properties;
Returns
a std::map with properties names as key.
See also
gd::PropertyDescriptor
virtual bool gd::Behavior::UpdateProperty ( gd::SerializerElement behaviorContent,
const gd::String name,
const gd::String value,
gd::Project project 
)
inlinevirtual

Called when the IDE wants to update a custom property of the behavior.

Returns
false if the new value cannot be set
See also
gd::InitialInstance

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