Game Develop Core: gd::Automatism Class Reference

| Game Develop Core Core library for developing platforms and tools compatible with Game Develop.

- Main Page
- Modules
- Classes

- Class List
- Class Index
- Class Hierarchy

All Classes Files Functions Variables Typedefs Enumerations Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
gd::Automatism Class Reference
Platform Definition ( Classes defining the common concepts used by all platforms )

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

`#include <Automatism.h>`

## Public Member Functions

virtual Automatism * | Clone () const
virtual void | SetName (const std::string &name_)
| Change the name identifying the automatism.
virtual const std::string & | GetName () const
| Return the name identifying the automatism.
virtual const std::string & | GetTypeName () const
| Return the name identifying the type of the automatism.
virtual void | SetTypeName (const std::string &type_)
| Change name identifying the type of the automatism. More...
virtual void | EditAutomatism (wxWindow *parent, gd::Project &project, gd::Layout *optionalLayout, gd::MainFrameWrapper &mainFrameWrapper_)
| Called when user wants to edit the automatism.
virtual std::map< std::string, gd::PropgridPropertyDescriptor > | GetProperties (gd::Project &project) const
| Called when the IDE wants to know about the custom properties of the automatism. More...
virtual bool | UpdateProperty (const std::string &name, const std::string &value, gd::Project &project)
| Called when the IDE wants to update a custom property of the automatism. More...
virtual void | SaveToXml (TiXmlElement *eventElem) const
| Save the object to XML.
virtual void | LoadFromXml (const TiXmlElement *eventElem)
| Load the object from XML.
C++ Platform specific
Members functions related to automatisms of GD C++ Platform. Should be moved to a separate RuntimeAutomatism class in GDCpp.
void | SetOwner (RuntimeObject *owner_)
void | StepPreEvents (RuntimeScene &scene)
void | StepPostEvents (RuntimeScene &scene)
void | Activate (bool enable=true)
bool | Activated () const
virtual void | OnActivate ()
virtual void | OnDeActivate ()

## Protected Member Functions

virtual void | DoStepPreEvents (RuntimeScene &scene)
virtual void | DoStepPostEvents (RuntimeScene &scene)
virtual void | OnOwnerChanged ()

## Protected Attributes

std::string | name
| Name of the automatism.
std::string | type
| The type indicate of which type is the automatism. ( To test if we can do something, like actions, reserved to specific automatism with it )
RuntimeObject * | object
| Object owning the automatism.
bool | activated
| True if automatism is running.

## Detailed Description

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

## Member Function Documentation

void gd::Automatism::Activate | ( | bool | enable = `true`) |  |

inline

De/Activate the automatism

bool gd::Automatism::Activated | ( | ) |  | const

inline

Return true if the automatism is activated

virtual void gd::Automatism::DoStepPostEvents | ( | RuntimeScene & | scene) |  |

inlineprotectedvirtual

Called at each frame after events

virtual void gd::Automatism::DoStepPreEvents | ( | RuntimeScene & | scene) |  |

inlineprotectedvirtual

Called at each frame before events

std::map< std::string, gd::PropgridPropertyDescriptor > gd::Automatism::GetProperties | ( | gd::Project & | project) |  | const

virtual

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

Usage example:

std::map<std::string, gd::PropgridPropertyDescriptor> properties;
properties[ToString(_("Initial speed"))].SetValue("5");
return properties;

Returns
  a std::map with properties names as key.

See Also
  gd::PropgridPropertyDescriptor

virtual void gd::Automatism::OnActivate | ( | ) |  |

inlinevirtual

Reimplement this method to do extra work when the automatism is activated

virtual void gd::Automatism::OnDeActivate | ( | ) |  |

inlinevirtual

Reimplement this method to do extra work when the automatism is deactivated

virtual void gd::Automatism::OnOwnerChanged | ( | ) |  |

inlineprotectedvirtual

Redefine this method so as to do special works when owner is set.

void gd::Automatism::SetOwner | ( | RuntimeObject * | owner_) |  |

inline

Set the object owning this automatism

virtual void gd::Automatism::SetTypeName | ( | const std::string & | type_) |  |

inlinevirtual

Change name identifying the type of the automatism.

You should not need to use this method: The type is set by the IDE when the automatism is created or when the automatism is loaded from xml.

void gd::Automatism::StepPostEvents | ( | RuntimeScene & | scene) |  |

inline

Called at each frame after events. Call DoStepPostEvents.

void gd::Automatism::StepPreEvents | ( | RuntimeScene & | scene) |  |

inline

Called at each frame before events. Call DoStepPreEvents.

virtual bool gd::Automatism::UpdateProperty | ( | const std::string & | name,
|  | const std::string & | value,
|  | gd::Project & | project
| ) |  |

inlinevirtual

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

Returns
  false if the new value cannot be set

See Also
  gd::InitialInstance

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

- Automatism.h
- Automatism.cpp