Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Community] [TweenZOrder] Support for GDevelop 5.4.x. #1363

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
182 changes: 165 additions & 17 deletions extensions/community/TweenZOrder.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,16 @@
"name": "TweenZOrder",
"previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/aa16433aab812cfb1e558bb1a8ccca399b07a10ea097f3ac81095141fe3f56a7_layers-triple.svg",
"shortDescription": "Smoothly animate Z order of objects.",
"version": "1.0.0",
"description": "This extension provides a behavior to smoothly animate the Z-order of an object. \nAdd the \"Tween Z-Order\" behavior to any object and use the \"Tween Z-Order\" action.",
"version": "1.0.1",
"description": [
"This extension provides a behavior to smoothly animate the Z-order of an object. ",
"Add the \"Tween Z-Order\" behavior to any object and use the \"Tween Z-Order\" action. ",
"",
"## Release Notes ",
"### v1.0.1 [2024/08/29]",
"- Support for GDevelop 5.4.x. ",
"- Changed duration unit from milliseconds to seconds. "
],
"tags": [
"tween",
"z-order"
Expand All @@ -18,6 +26,8 @@
"Zu55H5hcb9YmZTltIVOTAFDJQyB2"
],
"dependencies": [],
"globalVariables": [],
"sceneVariables": [],
"eventsFunctions": [],
"eventsBasedBehaviors": [
{
Expand All @@ -28,11 +38,11 @@
"eventsFunctions": [
{
"description": "Tweens an object Z order from its current value to a new one.",
"fullName": "Tween Z-Order",
"fullName": "Tween Z-Order (Deprecated, Millisecond type)",
"functionType": "Action",
"group": "Z order",
"group": "Layers and cameras",
"name": "TweenZOrder",
"sentence": "Tween the Z-Order of _PARAM0_ to _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ (Destroy: _PARAM6_)",
"sentence": "⚠️ Tween the Z-Order of _PARAM0_ to _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ (Destroy: _PARAM6_)",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
Expand All @@ -57,7 +67,7 @@
"Object",
"__TweenZOrder.LastID",
"=",
"GetArgumentAsString(\"TweenIdentifier\")"
"TweenIdentifier"
]
}
]
Expand All @@ -82,11 +92,11 @@
"parameters": [
"Object",
"Tween",
"GetArgumentAsString(\"TweenIdentifier\")",
"TweenIdentifier",
"__TweenZOrder.Z",
"GetArgumentAsNumber(\"ToZ\")",
"GetArgumentAsString(\"Easing\")",
"GetArgumentAsNumber(\"Ms\")",
"ToZ",
"Easing",
"Ms",
"yes"
]
}
Expand All @@ -113,11 +123,11 @@
"parameters": [
"Object",
"Tween",
"GetArgumentAsString(\"TweenIdentifier\")",
"TweenIdentifier",
"__TweenZOrder.Z",
"GetArgumentAsNumber(\"ToZ\")",
"GetArgumentAsString(\"Easing\")",
"GetArgumentAsNumber(\"Ms\")",
"ToZ",
"Easing",
"Ms",
"no"
]
}
Expand Down Expand Up @@ -165,6 +175,145 @@
],
"objectGroups": []
},
{
"description": "Tweens an object Z order from its current value to a new one.",
"fullName": "Tween Z-Order",
"functionType": "Action",
"group": "Layers and cameras",
"name": "TweenZOrderSecond",
"sentence": "Tween the Z-Order of _PARAM0_ to _PARAM3_ with easing _PARAM4_ over _PARAM5_s as _PARAM2_ (Destroy: _PARAM6_)",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"value": "ModVarObjet"
},
"parameters": [
"Object",
"__TweenZOrder.Z",
"=",
"Object.ZOrder()"
]
},
{
"type": {
"value": "ModVarObjetTxt"
},
"parameters": [
"Object",
"__TweenZOrder.LastID",
"=",
"TweenIdentifier"
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "GetArgumentAsBoolean"
},
"parameters": [
"\"Destroy\""
]
}
],
"actions": [
{
"type": {
"value": "Tween::TweenBehavior::AddObjectVariableTween3"
},
"parameters": [
"Object",
"Tween",
"TweenIdentifier",
"__TweenZOrder.Z",
"ToZ",
"Easing",
"Second",
"yes"
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"inverted": true,
"value": "GetArgumentAsBoolean"
},
"parameters": [
"\"Destroy\""
]
}
],
"actions": [
{
"type": {
"value": "Tween::TweenBehavior::AddObjectVariableTween3"
},
"parameters": [
"Object",
"Tween",
"TweenIdentifier",
"__TweenZOrder.Z",
"ToZ",
"Easing",
"Second",
"no"
]
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"type": "object"
},
{
"description": "Behavior",
"name": "Behavior",
"supplementaryInformation": "TweenZOrder::TweenZOrder",
"type": "behavior"
},
{
"description": "Tween Identifier",
"name": "TweenIdentifier",
"type": "string"
},
{
"description": "To Z order",
"name": "ToZ",
"type": "expression"
},
{
"description": "Easing",
"name": "Easing",
"supplementaryInformation": "[\"linear\",\"easeInQuad\",\"easeOutQuad\",\"easeInOutQuad\",\"easeInCubic\",\"easeOutCubic\",\"easeInOutCubic\",\"easeInQuart\",\"easeOutQuart\",\"easeInOutQuart\",\"easeInQuint\",\"easeOutQuint\",\"easeInOutQuint\",\"easeInSine\",\"easeOutSine\",\"easeInOutSine\",\"easeInExpo\",\"easeOutExpo\",\"easeInOutExpo\",\"easeInCirc\",\"easeOutCirc\",\"easeInOutCirc\",\"easeOutBounce\",\"easeInBack\",\"easeOutBack\",\"easeInOutBack\",\"elastic\",\"swingFromTo\",\"swingFrom\",\"swingTo\",\"bounce\",\"bouncePast\",\"easeFromTo\",\"easeFrom\",\"easeTo\"]",
"type": "stringWithSelector"
},
{
"description": "Duration, in seconds",
"name": "Second",
"type": "expression"
},
{
"description": "Destroy this object when Tween finishes",
"name": "Destroy",
"type": "yesorno"
}
],
"objectGroups": []
},
{
"fullName": "",
"functionType": "Action",
Expand All @@ -181,7 +330,7 @@
"parameters": [
"Object",
"Tween",
"Object.VariableString(__TweenZOrder.LastID)"
"Object.__TweenZOrder.LastID"
]
}
],
Expand All @@ -193,7 +342,7 @@
"parameters": [
"Object",
"=",
"Object.Variable(__TweenZOrder.Z)"
"Object.__TweenZOrder.Z"
]
}
]
Expand Down Expand Up @@ -225,7 +374,6 @@
"extraInformation": [
"Tween::TweenBehavior"
],
"hidden": false,
"name": "Tween"
}
],
Expand Down