![]() |
GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
|
Standard sprite object for extensions that implements the standard SpriteExtension (see gd::BuiltinExtensionsImplementer::ImplementsSpriteExtension). More...
#include <SpriteObject.h>
Inherits gd::ObjectConfiguration.
Public Member Functions | |
| std::unique_ptr< gd::ObjectConfiguration > | Clone () const override |
| void | ExposeResources (gd::ArbitraryResourceWorker &worker) override |
| Called ( e.g. during compilation ) so as to inventory internal resources and sometimes update their filename. Implementation example: More... | |
| std::map< gd::String, gd::PropertyDescriptor > | GetProperties () const override |
| Called when the IDE wants to know about the custom properties of the object configuration. More... | |
| bool | UpdateProperty (const gd::String &name, const gd::String &value) override |
| Called when the IDE wants to update a custom property of the object configuration. More... | |
| std::map< gd::String, gd::PropertyDescriptor > | GetInitialInstanceProperties (const gd::InitialInstance &position) override |
| Called when the IDE wants to know about the custom properties of an initial instance of this object configuration. More... | |
| bool | UpdateInitialInstanceProperty (gd::InitialInstance &position, const gd::String &name, const gd::String &value) override |
| Called when the IDE wants to update a custom property of an initial instance of this object configuration. More... | |
| size_t | GetAnimationsCount () const override |
| Return the number of animations declared in this object configuration. | |
| const gd::String & | GetAnimationName (size_t index) const override |
| Return the name of an animation declared in this object configuration. | |
| bool | HasAnimationNamed (const gd::String &animationName) const override |
| Return true if an animation is declared in this object configuration for a given name. | |
| const SpriteAnimationList & | GetAnimations () const |
| Return the animation configuration. | |
| SpriteAnimationList & | GetAnimations () |
| Return the animation configuration. | |
| void | SetUpdateIfNotVisible (bool updateIfNotVisible_) |
| Set if the object animation should be played even if the object is hidden or far from the camera. | |
| bool | GetUpdateIfNotVisible () const |
| Check if the object animation should be played even if the object is hidden or far from the camera (false by default). | |
| double | GetPreScale () |
| Return the scale applied to object to evaluate the default dimensions. | |
| void | SetPreScale (double preScale_) |
| Set the scale applied to object to evaluate the default dimensions. More... | |
Public Member Functions inherited from gd::ObjectConfiguration | |
| ObjectConfiguration () | |
| virtual | ~ObjectConfiguration () |
| void | SetType (const gd::String &type_) |
| Change the type of the object. | |
| const gd::String & | GetType () const |
| Return the type of the object. | |
| void | SerializeTo (SerializerElement &element) const |
| Serialize the object configuration. More... | |
| void | UnserializeFrom (gd::Project &project, const SerializerElement &element) |
| Unserialize the object configuration. More... | |
Additional Inherited Members | |
Protected Attributes inherited from gd::ObjectConfiguration | |
| gd::String | type |
Standard sprite object for extensions that implements the standard SpriteExtension (see gd::BuiltinExtensionsImplementer::ImplementsSpriteExtension).
A Sprite object is an object composed of animations, containing directions with images.
|
inlineoverridevirtual |
Must return a pointer to a copy of the configuration. This method is needed to do polymorphic copies. Just redefine this method in your derived object class like this:
Reimplemented from gd::ObjectConfiguration.
|
overridevirtual |
Called ( e.g. during compilation ) so as to inventory internal resources and sometimes update their filename. Implementation example:
Reimplemented from gd::ObjectConfiguration.
|
overridevirtual |
Called when the IDE wants to know about the custom properties of an initial instance of this object configuration.
Reimplemented from gd::ObjectConfiguration.
|
overridevirtual |
Called when the IDE wants to know about the custom properties of the object configuration.
Usage example:
Reimplemented from gd::ObjectConfiguration.
|
inline |
Set the scale applied to object to evaluate the default dimensions.
Its value must be strictly positive.
|
overridevirtual |
Called when the IDE wants to update a custom property of an initial instance of this object configuration.
Reimplemented from gd::ObjectConfiguration.
|
overridevirtual |
Called when the IDE wants to update a custom property of the object configuration.
Reimplemented from gd::ObjectConfiguration.