11 #include "GDCore/Project/VariablesContainer.h"
12 #include "GDCore/Project/BehaviorsContainer.h"
13 #include "GDCore/String.h"
15 class PropertyDescriptor;
18 class ObjectsContainer;
62 double GetX()
const {
return x; }
67 void SetX(
double x_) { x = x_; }
72 double GetY()
const {
return y; }
77 void SetY(
double y_) { y = y_; }
82 double GetZ()
const {
return z; }
87 void SetZ(
double z_) { z = z_; }
97 void SetAngle(
double angle_) { angle = angle_; }
215 customDepth = hasCustomDepth_;
218 double GetCustomWidth()
const {
return width; }
219 void SetCustomWidth(
double width_) { width = width_; }
220 double GetCustomHeight()
const {
return height; }
221 void SetCustomHeight(
double height_) { height = height_; }
222 double GetCustomDepth()
const {
return depth; }
223 void SetCustomDepth(
double depth_) { depth = depth_; }
225 double GetDefaultWidth()
const {
return defaultWidth; }
226 double GetDefaultHeight()
const {
return defaultHeight; }
227 double GetDefaultDepth()
const {
return defaultDepth; }
228 void SetDefaultWidth(
double width_) { defaultWidth = width_; }
229 void SetDefaultHeight(
double height_) { defaultHeight = height_; }
230 void SetDefaultDepth(
double depth_) { defaultDepth = depth_; }
282 return initialVariables;
301 bool HasAnyOverriddenProperty(
const gd::Object &
object);
307 bool HasAnyOverriddenPropertyForBehavior(
const gd::Behavior &behavior);
325 bool HasBehaviorOverridingNamed(
const gd::String &name)
const;
330 void RemoveBehaviorOverriding(
const gd::String &name);
336 bool RenameBehaviorOverriding(
const gd::String &name,
377 std::map<gd::String, gd::PropertyDescriptor> GetCustomProperties(
386 bool UpdateCustomProperty(
const gd::String& name,
398 double GetRawDoubleProperty(
const gd::String& name)
const;
412 void SetRawDoubleProperty(
const gd::String& name,
double value);
451 std::map<gd::String, double>
453 std::map<gd::String, gd::String>
461 double rotationX = 0;
462 double rotationY = 0;
465 bool flippedX =
false;
466 bool flippedY =
false;
467 bool flippedZ =
false;
469 bool customSize =
false;
470 bool customDepth =
false;
474 double defaultWidth = 0;
475 double defaultHeight = 0;
476 double defaultDepth = 0;
484 bool keepRatio =
true;
Base class used to represents a behavior that can be applied to an object. It stores the content (i....
Definition: Behavior.h:23
Represent an behaviors container of a platform.
Definition: BehaviorsContainer.h:37
Represents an instance of an object to be created on a layout start up.
Definition: InitialInstance.h:29
double GetRotationY() const
Get the rotation of the instance on Y axis, in radians.
Definition: InitialInstance.h:112
double GetRotationX() const
Get the rotation of the instance on X axis, in radians.
Definition: InitialInstance.h:102
void SetY(double y_)
Set the Y position of the instance.
Definition: InitialInstance.h:77
bool ShouldKeepRatio() const
Return true if the dimensions (width, height and depth) should keep the same ratio.
Definition: InitialInstance.h:263
void SetAngle(double angle_)
Set the rotation of the instance on Z axis, in radians.
Definition: InitialInstance.h:97
const gd::String & GetPersistentUuid() const
Reset the persistent UUID used to recognize the same initial instance between serialization.
Definition: InitialInstance.h:445
void SetX(double x_)
Set the X position of the instance.
Definition: InitialInstance.h:67
gd::VariablesContainer & GetVariables()
Definition: InitialInstance.h:289
double GetZ() const
Get the Z position of the instance.
Definition: InitialInstance.h:82
bool IsFlippedX() const
Return true if the instance is flipped on X axis.
Definition: InitialInstance.h:142
void SetRotationY(double rotationY_)
Set the rotation of the instance on Y axis, in radians.
Definition: InitialInstance.h:117
bool IsLocked() const
Return true if the instance is locked and cannot be moved in the IDE.
Definition: InitialInstance.h:236
void SetFlippedY(bool flippedY_)
Set whether the instance is flipped on Y axis.
Definition: InitialInstance.h:157
bool HasCustomDepth() const
Return true if the instance has a depth which is different from its object default depth....
Definition: InitialInstance.h:194
const gd::String & GetLayer() const
Get the layer the instance belongs to.
Definition: InitialInstance.h:172
void SetFlippedZ(bool flippedZ_)
Set whether the instance is flipped on Z axis.
Definition: InitialInstance.h:167
void SetHasCustomSize(bool hasCustomSize_)
Set whether the instance has a width/height which is different from its object default width/height o...
Definition: InitialInstance.h:203
void SetObjectName(const gd::String &name)
Set the name of object instantiated on the layout.
Definition: InitialInstance.h:57
const gd::String & GetObjectName() const
Get the name of object instantiated on the layout.
Definition: InitialInstance.h:52
void SetZOrder(int zOrder_)
Set the Z order of the instance (for a 2D object).
Definition: InitialInstance.h:127
double GetY() const
Get the Y position of the instance.
Definition: InitialInstance.h:72
void SetOpacity(int opacity_)
Set the opacity of the instance.
Definition: InitialInstance.h:137
void SetRotationX(double rotationX_)
Set the rotation of the instance on X axis, in radians.
Definition: InitialInstance.h:107
void SetShouldKeepRatio(bool enable=true)
Define if instance's dimensions should keep the same ratio.
Definition: InitialInstance.h:268
void SetZ(double z_)
Set the Z position of the instance.
Definition: InitialInstance.h:87
void SetFlippedX(bool flippedX_)
Set whether the instance is flipped on X axis.
Definition: InitialInstance.h:147
bool IsSealed() const
Return true if the instance cannot be selected by clicking on it in the IDE (only applies if instance...
Definition: InitialInstance.h:249
void SetLayer(const gd::String &layer_)
Set the layer the instance belongs to.
Definition: InitialInstance.h:177
int GetOpacity() const
Get Opacity.
Definition: InitialInstance.h:132
double GetAngle() const
Get the rotation of the instance on Z axis, in radians.
Definition: InitialInstance.h:92
bool IsFlippedZ() const
Return true if the instance is flipped on Z axis.
Definition: InitialInstance.h:162
InitialInstance * Clone() const
Definition: InitialInstance.h:42
bool IsFlippedY() const
Return true if the instance is flipped on Y axis.
Definition: InitialInstance.h:152
bool HasCustomSize() const
Return true if the instance has a width/height which is different from its object default width/heigh...
Definition: InitialInstance.h:186
int GetZOrder() const
Get the Z order of the instance (for a 2D object).
Definition: InitialInstance.h:122
double GetX() const
Get the X position of the instance.
Definition: InitialInstance.h:62
void SetLocked(bool enable=true)
(Un)lock the initial instance.
Definition: InitialInstance.h:243
void SetHasCustomDepth(bool hasCustomDepth_)
Set whether the instance has a depth which is different from its object default depth or not....
Definition: InitialInstance.h:214
void SetSealed(bool enable=true)
(Un)seal the initial instance.
Definition: InitialInstance.h:257
const gd::VariablesContainer & GetVariables() const
Definition: InitialInstance.h:281
Represent an object of a platform.
Definition: Object.h:38
Used as a base class for classes that will own objects (see gd::Object).
Definition: ObjectsContainer.h:37
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
Class defining a container for gd::Variable.
Definition: VariablesContainer.h:28
Definition: CommonTools.h:24