From 66b394f95ac8232ed4094ba3b6062be46cdbcab9 Mon Sep 17 00:00:00 2001 From: PANDAKO-GitHub <68310169+PANDAKO-GitHub@users.noreply.github.com> Date: Thu, 29 Aug 2024 17:04:56 +0900 Subject: [PATCH] [Community] [TweenZOrder] v1.0.1 - Support for GDevelop 5.4.x. - Changed duration unit from milliseconds to seconds. --- extensions/community/TweenZOrder.json | 182 +++++++++++++++++++++++--- 1 file changed, 165 insertions(+), 17 deletions(-) diff --git a/extensions/community/TweenZOrder.json b/extensions/community/TweenZOrder.json index 50335546..71e9587a 100644 --- a/extensions/community/TweenZOrder.json +++ b/extensions/community/TweenZOrder.json @@ -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" @@ -18,6 +26,8 @@ "Zu55H5hcb9YmZTltIVOTAFDJQyB2" ], "dependencies": [], + "globalVariables": [], + "sceneVariables": [], "eventsFunctions": [], "eventsBasedBehaviors": [ { @@ -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", @@ -57,7 +67,7 @@ "Object", "__TweenZOrder.LastID", "=", - "GetArgumentAsString(\"TweenIdentifier\")" + "TweenIdentifier" ] } ] @@ -82,11 +92,11 @@ "parameters": [ "Object", "Tween", - "GetArgumentAsString(\"TweenIdentifier\")", + "TweenIdentifier", "__TweenZOrder.Z", - "GetArgumentAsNumber(\"ToZ\")", - "GetArgumentAsString(\"Easing\")", - "GetArgumentAsNumber(\"Ms\")", + "ToZ", + "Easing", + "Ms", "yes" ] } @@ -113,11 +123,11 @@ "parameters": [ "Object", "Tween", - "GetArgumentAsString(\"TweenIdentifier\")", + "TweenIdentifier", "__TweenZOrder.Z", - "GetArgumentAsNumber(\"ToZ\")", - "GetArgumentAsString(\"Easing\")", - "GetArgumentAsNumber(\"Ms\")", + "ToZ", + "Easing", + "Ms", "no" ] } @@ -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", @@ -181,7 +330,7 @@ "parameters": [ "Object", "Tween", - "Object.VariableString(__TweenZOrder.LastID)" + "Object.__TweenZOrder.LastID" ] } ], @@ -193,7 +342,7 @@ "parameters": [ "Object", "=", - "Object.Variable(__TweenZOrder.Z)" + "Object.__TweenZOrder.Z" ] } ] @@ -225,7 +374,6 @@ "extraInformation": [ "Tween::TweenBehavior" ], - "hidden": false, "name": "Tween" } ],