6 #ifndef GDCORE_OBJECTCONFIGURATION_H
7 #define GDCORE_OBJECTCONFIGURATION_H
8 #include "GDCore/Vector2.h"
13 #include "GDCore/Project/Behavior.h"
14 #include "GDCore/Project/EffectsContainer.h"
15 #include "GDCore/Project/ResourcesManager.h"
16 #include "GDCore/Project/VariablesContainer.h"
17 #include "GDCore/String.h"
18 #include "GDCore/Tools/MakeUnique.h"
20 class PropertyDescriptor;
23 class ArbitraryResourceWorker;
24 class InitialInstance;
25 class SerializerElement;
26 class EffectsContainer;
58 virtual std::unique_ptr<gd::ObjectConfiguration>
Clone()
const {
59 return gd::make_unique<gd::ObjectConfiguration>(*
this);
91 virtual std::map<gd::String, gd::PropertyDescriptor> GetProperties()
const;
116 virtual std::map<gd::String, gd::PropertyDescriptor>
185 return badAnimationName;
223 using ObjConfSPtr = std::unique_ptr<gd::ObjectConfiguration>;
ArbitraryResourceWorker is used so as to inventory resources and sometimes update them.
Definition: ArbitraryResourceWorker.h:44
Represents an instance of an object to be created on a layout start up.
Definition: InitialInstance.h:26
Base class used to represent an object configuration. For example, this can be the animations in a sp...
Definition: ObjectConfiguration.h:38
virtual std::unique_ptr< gd::ObjectConfiguration > Clone() const
Definition: ObjectConfiguration.h:58
virtual const gd::String & GetAnimationName(size_t index) const
Return the name of an animation declared in this object configuration.
Definition: ObjectConfiguration.h:184
void SetType(const gd::String &type_)
Change the type of the object.
Definition: ObjectConfiguration.h:64
virtual void DoSerializeTo(SerializerElement &element) const
Derived object configuration can redefine this method to save custom attributes.
Definition: ObjectConfiguration.h:212
virtual void ExposeResources(gd::ArbitraryResourceWorker &worker)
Called ( e.g. during compilation ) so as to inventory internal resources and sometimes update their f...
Definition: ObjectConfiguration.h:148
virtual bool HasAnimationNamed(const gd::String &animationName) const
Return true if an animation is declared in this object configuration for a given name.
Definition: ObjectConfiguration.h:192
gd::String type
Definition: ObjectConfiguration.h:198
virtual bool UpdateProperty(const gd::String &name, const gd::String &value)
Called when the IDE wants to update a custom property of the object configuration.
Definition: ObjectConfiguration.h:99
const gd::String & GetType() const
Return the type of the object.
Definition: ObjectConfiguration.h:70
virtual bool UpdateInitialInstanceProperty(gd::InitialInstance &instance, const gd::String &name, const gd::String &value)
Called when the IDE wants to update a custom property of an initial instance of this object configura...
Definition: ObjectConfiguration.h:126
virtual void DoUnserializeFrom(gd::Project &project, const SerializerElement &element)
Derived object configuration can redefine this method to load custom attributes.
Definition: ObjectConfiguration.h:205
virtual size_t GetAnimationsCount() const
Return the number of animations declared in this object configuration.
Definition: ObjectConfiguration.h:176
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:50
A generic container that can represent a value ( containing a string, double, bool or int),...
Definition: SerializerElement.h:37
String represents an UTF8 encoded string.
Definition: String.h:33
Definition: CommonTools.h:24