mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
fix data transfer from object to renderer
This commit is contained in:
@@ -191,7 +191,7 @@ Model3DObjectConfiguration::GetProperties() const {
|
||||
objectProperties["isCastingShadow"]
|
||||
.SetValue(isCastingShadow ? "true" : "false")
|
||||
.SetType("boolean")
|
||||
.SetLabel(_("Shadow Casting"))
|
||||
.SetLabel(_("Shadow casting"))
|
||||
.SetGroup(_("Shadows"));
|
||||
|
||||
objectProperties["isReceivingShadow"]
|
||||
@@ -265,8 +265,8 @@ void Model3DObjectConfiguration::DoSerializeTo(
|
||||
content.SetAttribute("centerLocation", centerLocation);
|
||||
content.SetAttribute("keepAspectRatio", keepAspectRatio);
|
||||
content.SetAttribute("crossfadeDuration", crossfadeDuration);
|
||||
content.SetAttribute("castShadow", isCastingShadow);
|
||||
content.SetAttribute("receiveShadow", isReceivingShadow);
|
||||
content.SetAttribute("isCastingShadow", isCastingShadow);
|
||||
content.SetAttribute("isReceivingShadow", isReceivingShadow);
|
||||
|
||||
auto &animationsElement = content.AddChild("animations");
|
||||
animationsElement.ConsiderAsArrayOf("animation");
|
||||
|
@@ -127,13 +127,12 @@ namespace gdjs {
|
||||
objectData.content.materialType
|
||||
);
|
||||
|
||||
this._isCastingShadow = objectData.content.isCastingShadow;
|
||||
this._isReceivingShadow = objectData.content.isReceivingShadow;
|
||||
this.onModelChanged(objectData);
|
||||
|
||||
this._crossfadeDuration = objectData.content.crossfadeDuration || 0;
|
||||
|
||||
this._isCastingShadow = objectData.content.isCastingShadow;
|
||||
this._isReceivingShadow = objectData.content.isReceivingShadow;
|
||||
|
||||
// *ALWAYS* call `this.onCreated()` at the very end of your object constructor.
|
||||
this.onCreated();
|
||||
}
|
||||
@@ -377,11 +376,11 @@ namespace gdjs {
|
||||
return this._renderer.hasAnimationEnded();
|
||||
}
|
||||
|
||||
setCastShadow(value: boolean): void {
|
||||
setIsCastShadow(value: boolean): void {
|
||||
this._isCastingShadow = value;
|
||||
}
|
||||
|
||||
setReceiveShadow(value: boolean): void {
|
||||
setIsReceiveShadow(value: boolean): void {
|
||||
this._isReceivingShadow = value;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user