diff --git a/extensions/community/TweenGroup.json b/extensions/community/TweenGroup.json new file mode 100644 index 000000000..eae0e8a57 --- /dev/null +++ b/extensions/community/TweenGroup.json @@ -0,0 +1,5590 @@ +{ + "author": "", + "category": "Game mechanic", + "extensionNamespace": "", + "fullName": "Tween Group", + "helpPath": "", + "iconUrl": "", + "name": "TweenGroup", + "previewIconUrl": "", + "shortDescription": "Create tweens for a group of objects.", + "version": "0.0.1", + "description": [ + "Create a group of objects and perform tweens on them, making it easier to handle group behaviors. It currently supports all the main conditions, actions, and expressions present in a [tween behavior](https://wiki.gdevelop.io/gdevelop5/behaviors/tween).", + "", + "Useful for creating a sliding menu, make sequential tweens of the same type, etc.", + "", + "The main usability differences between TweenGroup behavior and the regular tween behavior are:", + "- destroy this object when tween finishes: set to false in all tweens;", + "- all tweens have a new parameter `delay`: you can set a delay between internal calls, creating a domino effect of tweens;", + "- some of the tweens have 3 versions:", + " - Regular (e.g. `AddObjectPositionYTween`): move all registered objects to the same Y position;", + " - Relative (e.g. `AddObjectRelativePositionYTween`): adds value to all registered objects Y position;", + " - Multiplier (e.g. `AddObjectMultiplierPositionYTween`): multiplies all registered objects Y position by value." + ], + "tags": [ + "tween", + "group", + "group behavior", + "animation" + ], + "authorIds": [ + "5gByFNGtfFOapWi8AraDhgObyDS2" + ], + "dependencies": [], + "eventsFunctions": [], + "eventsBasedBehaviors": [ + { + "description": "Window with different elements that slide together.", + "fullName": "Sliding window", + "name": "SlidingWindow", + "objectType": "", + "eventsFunctions": [ + { + "fullName": "", + "functionType": "Action", + "name": "onCreated", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Top\"" + ] + }, + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"TopLeft\"" + ] + }, + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"TopRight\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "TweenGroup::SlidingWindow::SetPropertyDiffY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "CameraHeight()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Bottom\"" + ] + }, + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"BottomLeft\"" + ] + }, + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"BottomRight\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "TweenGroup::SlidingWindow::SetPropertyDiffY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "-CameraHeight()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Left\"" + ] + }, + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"TopLeft\"" + ] + }, + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"BottomLeft\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "TweenGroup::SlidingWindow::SetPropertyDiffX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "CameraWidth()" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "BuiltinCommonInstructions::Or" + }, + "parameters": [], + "subInstructions": [ + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"Right\"" + ] + }, + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"TopRight\"" + ] + }, + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDirection" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "\"BottomRight\"" + ] + } + ] + } + ], + "actions": [ + { + "type": { + "value": "TweenGroup::SlidingWindow::SetPropertyDiffX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "-CameraWidth()" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::SlidingWindow", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "fullName": "", + "functionType": "Action", + "name": "doStepPreEvents", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "KeyFromTextReleased" + }, + "parameters": [ + "", + "Object.Behavior::PropertyControlKey()" + ] + }, + { + "type": { + "inverted": true, + "value": "TweenGroup::TweenGroup::AnyTweenIsPlaying" + }, + "parameters": [ + "Object", + "TweenGroup", + "\"EnterFrom\" + Object.Behavior::PropertyDirection()", + "" + ] + }, + { + "type": { + "inverted": true, + "value": "TweenGroup::TweenGroup::AnyTweenIsPlaying" + }, + "parameters": [ + "Object", + "TweenGroup", + "\"LeaveTo\" + Object.Behavior::PropertyDirection()", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TweenGroup::SlidingWindow::HasSlid" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "handledDisplay", + "True" + ] + }, + { + "type": { + "value": "TweenGroup::SlidingWindow::SetPropertyIsSliding" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "TweenGroup::SlidingWindow::SetPropertyHasSlided" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDiffX" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + }, + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDiffY" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "TweenGroup::TweenGroup::AddObjectRelativePositionTween" + }, + "parameters": [ + "Object", + "TweenGroup", + "\"LeaveTo\" + Object.Behavior::PropertyDirection()", + "-Object.Behavior::PropertyDiffX()", + "-Object.Behavior::PropertyDiffY()", + "Object.Behavior::PropertyEasingFunction()", + "Object.Behavior::PropertyDuration()", + "0", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDiffX" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + }, + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDiffY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "TweenGroup::TweenGroup::AddObjectRelativePositionXTween" + }, + "parameters": [ + "Object", + "TweenGroup", + "\"LeaveTo\" + Object.Behavior::PropertyDirection()", + "-Object.Behavior::PropertyDiffX()", + "Object.Behavior::PropertyEasingFunction()", + "Object.Behavior::PropertyDuration()", + "0", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDiffX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDiffY" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "TweenGroup::TweenGroup::AddObjectRelativePositionYTween" + }, + "parameters": [ + "Object", + "TweenGroup", + "\"LeaveTo\" + Object.Behavior::PropertyDirection()", + "-Object.Behavior::PropertyDiffY()", + "Object.Behavior::PropertyEasingFunction()", + "Object.Behavior::PropertyDuration()", + "0", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "ObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "handledDisplay", + "False" + ] + }, + { + "type": { + "inverted": true, + "value": "TweenGroup::SlidingWindow::HasSlid" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "TweenGroup::SlidingWindow::SetPropertyIsSliding" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + } + ], + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDiffX" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + }, + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDiffY" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "TweenGroup::TweenGroup::AddObjectRelativePositionTween" + }, + "parameters": [ + "Object", + "TweenGroup", + "\"EnterFrom\" + Object.Behavior::PropertyDirection()", + "Object.Behavior::PropertyDiffX()", + "Object.Behavior::PropertyDiffY()", + "Object.Behavior::PropertyEasingFunction()", + "Object.Behavior::PropertyDuration()", + "0", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDiffX" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + }, + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDiffY" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "TweenGroup::TweenGroup::AddObjectRelativePositionXTween" + }, + "parameters": [ + "Object", + "TweenGroup", + "\"EnterFrom\" + Object.Behavior::PropertyDirection()", + "Object.Behavior::PropertyDiffX()", + "Object.Behavior::PropertyEasingFunction()", + "Object.Behavior::PropertyDuration()", + "0", + "" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDiffX" + }, + "parameters": [ + "Object", + "Behavior", + "=", + "0" + ] + }, + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyDiffY" + }, + "parameters": [ + "Object", + "Behavior", + "!=", + "0" + ] + } + ], + "actions": [ + { + "type": { + "value": "TweenGroup::TweenGroup::AddObjectRelativePositionYTween" + }, + "parameters": [ + "Object", + "TweenGroup", + "\"EnterFrom\" + Object.Behavior::PropertyDirection()", + "Object.Behavior::PropertyDiffY()", + "Object.Behavior::PropertyEasingFunction()", + "Object.Behavior::PropertyDuration()", + "0", + "" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "SetObjectVariableAsBoolean" + }, + "parameters": [ + "Object", + "handledDisplay", + "False" + ] + } + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "TweenGroup::SlidingWindow::HasSlid" + }, + "parameters": [ + "Object", + "Behavior", + "" + ] + }, + { + "type": { + "value": "TweenGroup::TweenGroup::TweensExist" + }, + "parameters": [ + "Object", + "TweenGroup", + "\"EnterFrom\" + Object.Behavior::PropertyDirection()", + "" + ] + }, + { + "type": { + "value": "TweenGroup::TweenGroup::AllTweensHaveFinished" + }, + "parameters": [ + "Object", + "TweenGroup", + "\"EnterFrom\" + Object.Behavior::PropertyDirection()", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TweenGroup::SlidingWindow::SetPropertyHasSlided" + }, + "parameters": [ + "Object", + "Behavior", + "yes" + ] + }, + { + "type": { + "value": "TweenGroup::TweenGroup::RemoveTween" + }, + "parameters": [ + "Object", + "TweenGroup", + "\"EnterFrom\" + Object.Behavior::PropertyDirection()", + "" + ] + }, + { + "type": { + "value": "TweenGroup::SlidingWindow::SetPropertyIsSliding" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TweenGroup::TweenGroup::TweensExist" + }, + "parameters": [ + "Object", + "TweenGroup", + "\"LeaveTo\" + Object.Behavior::PropertyDirection()", + "" + ] + }, + { + "type": { + "value": "TweenGroup::TweenGroup::AllTweensHaveFinished" + }, + "parameters": [ + "Object", + "TweenGroup", + "\"LeaveTo\" + Object.Behavior::PropertyDirection()", + "" + ] + }, + { + "type": { + "value": "BuiltinCommonInstructions::Once" + }, + "parameters": [] + } + ], + "actions": [ + { + "type": { + "value": "TweenGroup::TweenGroup::RemoveTween" + }, + "parameters": [ + "Object", + "TweenGroup", + "\"LeaveTo\" + Object.Behavior::PropertyDirection()", + "" + ] + }, + { + "type": { + "value": "TweenGroup::SlidingWindow::SetPropertyIsSliding" + }, + "parameters": [ + "Object", + "Behavior", + "no" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::SlidingWindow", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the window has slid.", + "fullName": "Has slid", + "functionType": "Condition", + "name": "HasSlid", + "sentence": "_PARAM0_ has slid", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyHasSlided" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::SlidingWindow", + "type": "behavior" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the window is sliding.", + "fullName": "Is sliding", + "functionType": "Condition", + "name": "IsSliding", + "sentence": "_PARAM0_ is sliding", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TweenGroup::SlidingWindow::PropertyIsSliding" + }, + "parameters": [ + "Object", + "Behavior" + ] + } + ], + "actions": [ + { + "type": { + "value": "SetReturnBoolean" + }, + "parameters": [ + "True" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::SlidingWindow", + "type": "behavior" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "p", + "type": "String", + "label": "Key to slide forward/back the window", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "ControlKey" + }, + { + "value": "Top", + "type": "Choice", + "label": "Direction from where the menu will enter/leave", + "description": "", + "group": "", + "extraInformation": [ + "Top", + "TopRight", + "Right", + "BottomRight", + "Bottom", + "BottomLeft", + "Left", + "TopLeft" + ], + "hidden": false, + "name": "Direction" + }, + { + "value": "linear", + "type": "Choice", + "label": "Easing function", + "description": "", + "group": "", + "extraInformation": [ + "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" + ], + "hidden": false, + "name": "EasingFunction" + }, + { + "value": "1000", + "type": "Number", + "label": "Duration (in ms)", + "description": "", + "group": "", + "extraInformation": [], + "hidden": false, + "name": "Duration" + }, + { + "value": "", + "type": "Behavior", + "label": "Tween group behavior", + "description": "", + "group": "", + "extraInformation": [ + "TweenGroup::TweenGroup" + ], + "hidden": false, + "name": "TweenGroup" + }, + { + "value": "0", + "type": "Number", + "label": "Difference in value to add to X component", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "DiffX" + }, + { + "value": "0", + "type": "Number", + "label": "Difference in value to add to Y component", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "DiffY" + }, + { + "value": "", + "type": "Boolean", + "label": "Window have slided", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "HasSlided" + }, + { + "value": "", + "type": "Boolean", + "label": "Window is sliding", + "description": "", + "group": "", + "extraInformation": [], + "hidden": true, + "name": "IsSliding" + } + ], + "sharedPropertyDescriptors": [] + }, + { + "description": "Apply tween behavior to a group of objects with tween behavior.", + "fullName": "Tween group", + "name": "TweenGroup", + "objectType": "", + "eventsFunctions": [ + { + "description": "Check if the object has tween behavior", + "fullName": "Can object be registered", + "functionType": "Condition", + "name": "CanElementBeRegistered", + "private": true, + "sentence": "_PARAM2_ can be registered in _PARAM0_ (has tween behavior)", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the parameter object and checks if it has the Tween behavior", + "const element = eventsFunctionContext.getObjects(\"Element\")[0];", + "const tween = element.getBehavior(\"Tween\");", + "", + "if (tween != null) {", + " eventsFunctionContext.returnValue = true;", + "}", + "else {", + " eventsFunctionContext.returnValue = false;", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Element", + "name": "Element", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Register object as part of this group.", + "fullName": "Register object", + "functionType": "Action", + "name": "RegisterObject", + "sentence": "Register _PARAM2_ as part of _PARAM0_", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "value": "TweenGroup::TweenGroup::CanElementBeRegistered" + }, + "parameters": [ + "Object", + "Behavior", + "Element", + "" + ] + } + ], + "actions": [], + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementName = eventsFunctionContext.getObjects(\"Element\")[0].name;", + "", + "let elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\");", + "const nElements = elementsNames.getAllChildrenArray().length;", + "elementsNames.getChild(nElements).setString(elementName);" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ] + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [ + { + "type": { + "inverted": true, + "value": "TweenGroup::TweenGroup::CanElementBeRegistered" + }, + "parameters": [ + "Object", + "Behavior", + "Element", + "" + ] + } + ], + "actions": [ + { + "type": { + "value": "DebuggerTools::ConsoleLog" + }, + "parameters": [ + "Element.ObjectName() + \" does not have a Tween behavior, so it can't be registered in \" + Object.ObjectName()", + "\"warning\"", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Element", + "name": "Element", + "type": "objectList" + } + ], + "objectGroups": [] + }, + { + "description": "Pause the running tween animations.", + "fullName": "Pause a group of tweens", + "functionType": "Action", + "name": "PauseTween", + "sentence": "Pause tweens _PARAM2_ from _PARAM0_ elements waiting _PARAM3_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "if (tween.exists(tweenName) && tween.isPlaying(tweenName)) {", + " tween.pauseTween(tweenName);", + "}", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " if (tween.exists(tweenName) && tween.isPlaying(tweenName)) {", + " tween.pauseTween(tweenName);", + " }", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween::PauseTween" + }, + "parameters": [ + "Object", + "Tween", + "GetArgumentAsString(\"Identifier\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "Identifier", + "type": "string" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Remove the tween animations from the objects.", + "fullName": "Remove a group of tweens", + "functionType": "Action", + "name": "RemoveTween", + "sentence": "Remove tweens _PARAM2_ from _PARAM0_ elements", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "if (tween.exists(tweenName)) {", + " if (tween.isPlaying(tweenName)) {", + " tween.stopTween(tweenName, false);", + " }", + " ", + " tween.removeTween(tweenName);", + "}", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " if (tween.exists(tweenName)) {", + " if (tween.isPlaying(tweenName)) {", + " tween.stopTween(tweenName);", + " }", + " ", + " tween.removeTween(tweenName);", + " }", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween::RemoveTween" + }, + "parameters": [ + "Object", + "Tween", + "GetArgumentAsString(\"Identifier\")" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "Identifier", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Resume the tween animations.", + "fullName": "Resume a group of tweens", + "functionType": "Action", + "name": "ResumeTween", + "sentence": "Resume tweens _PARAM2_ from _PARAM0_ elements waiting _PARAM3_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween::ResumeTween" + }, + "parameters": [ + "Object", + "Tween", + "GetArgumentAsString(\"Identifier\")" + ] + } + ] + }, + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "if (tween.exists(tweenName) && !tween.isPlaying(tweenName)) {", + " tween.resumeTween(tweenName);", + "}", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " if (tween.exists(tweenName) && !tween.isPlaying(tweenName)) {", + " tween.resumeTween(tweenName);", + " }", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "Identifier", + "type": "string" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Stop the running tween animations.", + "fullName": "Stop a group of tweens", + "functionType": "Action", + "name": "StopTween", + "sentence": "Stop tweens _PARAM2_ from _PARAM0_ elements waiting _PARAM4_ms in between, jump to end: _PARAM3_", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "const jumpToDest = eventsFunctionContext.getArgument(\"JumpToDest\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "if (tween.exists(tweenName)) {", + " tween.stopTween(tweenName, jumpToDest);", + "}", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " if (tween.exists(tweenName)) {", + " tween.stopTween(tweenName, jumpToDest);", + " }", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [ + { + "type": { + "value": "Tween::StopTween" + }, + "parameters": [ + "Object", + "Tween", + "GetArgumentAsString(\"Identifier\")", + "" + ] + } + ] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween identifier", + "name": "Identifier", + "type": "string" + }, + { + "description": "Jump to end", + "name": "JumpToDest", + "type": "yesorno" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens a variable's numeric value in all objects from its current value to a new one.", + "fullName": "Tween a number in a variable in all objects", + "functionType": "Action", + "name": "AddObjectVariableTween", + "sentence": "Tween the variable _PARAM3_ of _PARAM0_'s elements to _PARAM4_ with easing _PARAM5_ over _PARAM6_ms as _PARAM2_ waiting _PARAM7_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const objectVarName = eventsFunctionContext.getArgument(\"ObjectVar\")", + "const value = eventsFunctionContext.getArgument(\"Value\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "let objectVar = currObj.getVariables().get(objectVarName)", + "tween.addVariableTween2(tweenName, objectVar, value, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " let objectVar = obj.getVariables().get(objectVarName)", + " tween.addVariableTween2(tweenName, objectVar, value, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "Object variable", + "name": "ObjectVar", + "type": "string" + }, + { + "description": "To value", + "name": "Value", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens a variable's numeric value in all objects from its current value to a new one by adding.", + "fullName": "Tween a relative number in a variable in all objects", + "functionType": "Action", + "name": "AddObjectRelativeVariableTween", + "sentence": "Tween the variable _PARAM3_ of _PARAM0_'s elements to current value + _PARAM4_ with easing _PARAM5_ over _PARAM6_ms as _PARAM2_ waiting _PARAM7_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const objectVarName = eventsFunctionContext.getArgument(\"ObjectVar\")", + "const value = eventsFunctionContext.getArgument(\"Value\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "let objectVar = currObj.getVariables().get(objectVarName)", + "tween.addVariableTween2(tweenName, objectVar, objectVar.getValue() + value, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " let objectVar = obj.getVariables().get(objectVarName)", + " tween.addVariableTween2(tweenName, objectVar, objectVar.getValue() + value, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "Object variable", + "name": "ObjectVar", + "type": "string" + }, + { + "description": "Add value", + "name": "Value", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens a variable's numeric value in all objects from its current value to a new one by multiplying it.", + "fullName": "Tween a number in a variable in all objects by multiplying it", + "functionType": "Action", + "name": "AddObjectMultiplierVariableTween", + "sentence": "Tween the variable _PARAM3_ of _PARAM0_'s elements to current value * _PARAM4_ with easing _PARAM5_ over _PARAM6_ms as _PARAM2_ waiting _PARAM7_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const objectVarName = eventsFunctionContext.getArgument(\"ObjectVar\")", + "const multiplier = eventsFunctionContext.getArgument(\"Multiplier\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "let objectVar = currObj.getVariables().get(objectVarName)", + "tween.addVariableTween2(tweenName, objectVar, objectVar.getValue() * multiplier, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " let objectVar = obj.getVariables().get(objectVarName)", + " tween.addVariableTween2(tweenName, objectVar, objectVar.getValue() * multiplier, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "Object variable", + "name": "ObjectVar", + "type": "string" + }, + { + "description": "Multiplier", + "name": "Multiplier", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the objects angles from its current angle to a new one.", + "fullName": "Tween objects angle", + "functionType": "Action", + "name": "AddObjectAngleTween", + "sentence": "Tween the angle of _PARAM0_ to _PARAM3_° with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM6_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const angle = eventsFunctionContext.getArgument(\"Angle\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectAngleTween(tweenName, angle, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectAngleTween(tweenName, angle, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "To angle (in degrees)", + "name": "Angle", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the objects angles from its current angle to a new one by adding the angle.", + "fullName": "Tween objects relative angle", + "functionType": "Action", + "name": "AddObjectRelativeAngleTween", + "sentence": "Tween the angles of _PARAM0_'s elements to current angle + _PARAM3_° with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM6_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const angle = eventsFunctionContext.getArgument(\"Angle\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectAngleTween(tweenName, currObj.angle + angle, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectAngleTween(tweenName, obj.angle + angle, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "Add angle (in degrees)", + "name": "Angle", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the objects angles from its current angle to a new one by multiplying it.", + "fullName": "Tween objects angle by multiplying it", + "functionType": "Action", + "name": "AddObjectMultiplierAngleTween", + "sentence": "Tween the angles of _PARAM0_'s elements by multiplying it by _PARAM3_° with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM6_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const multiplier = eventsFunctionContext.getArgument(\"Multiplier\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectAngleTween(tweenName, currObj.angle * multiplier, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectAngleTween(tweenName, obj.angle * multiplier, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "Multiplier", + "name": "Multiplier", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the objects position from its current position to a new one.", + "fullName": "Tween objects position", + "functionType": "Action", + "name": "AddObjectPositionTween", + "sentence": "Tween the position of _PARAM0_ to x: _PARAM3_, y: _PARAM4_ with easing _PARAM5_ over _PARAM6_ms as _PARAM2_ waiting _PARAM7_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectPositionTween(tweenName, x, y, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectPositionTween(tweenName, x, y, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "To X", + "name": "X", + "type": "expression" + }, + { + "description": "To Y", + "name": "Y", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the objects position from its current position to a new one by adding the position.", + "fullName": "Tween objects relative position", + "functionType": "Action", + "name": "AddObjectRelativePositionTween", + "sentence": "Tween the position of _PARAM0_ to x: current x + _PARAM3_, y: current y + _PARAM4_ with easing _PARAM5_ over _PARAM6_ms as _PARAM2_ waiting _PARAM7_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const x = eventsFunctionContext.getArgument(\"X\");", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectPositionTween(tweenName, currObj.x + x, currObj.y + y, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectPositionTween(tweenName, obj.x + x, obj.y + y, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "Add X", + "name": "X", + "type": "expression" + }, + { + "description": "Add Y", + "name": "Y", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the objects position from its current position to a new one by multiplying it.", + "fullName": "Tween objects position by multiplying it", + "functionType": "Action", + "name": "AddObjectMultiplierPositionTween", + "sentence": "Tween the position of _PARAM0_ to x: current x * _PARAM3_, y: current y * _PARAM4_ with easing _PARAM5_ over _PARAM6_ms as _PARAM2_ waiting _PARAM7_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const multiplyX = eventsFunctionContext.getArgument(\"MultiplyX\");", + "const multiplyY = eventsFunctionContext.getArgument(\"MultiplyY\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectPositionTween(tweenName, currObj.x * multiplyX, currObj.y * multiplyY, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectPositionTween(tweenName, obj.x * multiplyX, obj.y * multiplyY, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "Multiply X", + "name": "MultiplyX", + "type": "expression" + }, + { + "description": "Multiply Y", + "name": "MultiplyY", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the objects X position from its current X position to a new one.", + "fullName": "Tween objects X position", + "functionType": "Action", + "name": "AddObjectPositionXTween", + "sentence": "Tween the X position of _PARAM0_'s elements to _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM6_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const x = eventsFunctionContext.getArgument(\"X\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectPositionXTween(tweenName, x, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectPositionXTween(tweenName, x, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "To X", + "name": "X", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the objects X position from its current X position to a new one by adding the X.", + "fullName": "Tween objects relative X position", + "functionType": "Action", + "name": "AddObjectRelativePositionXTween", + "sentence": "Tween the X position of _PARAM0_'s elements to current x + _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM6_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const x = eventsFunctionContext.getArgument(\"X\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectPositionXTween(tweenName, currObj.x + x, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectPositionXTween(tweenName, obj.x + x, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "Add X", + "name": "X", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the objects X position from its current X position to a new one by multiplying it.", + "fullName": "Tween objects X position by multiplying it", + "functionType": "Action", + "name": "AddObjectMultiplierPositionXTween", + "sentence": "Tween the X position of _PARAM0_'s elements to current x * _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM6_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const multiplyX = eventsFunctionContext.getArgument(\"MultiplyX\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectPositionXTween(tweenName, currObj.x * multiplyX, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectPositionXTween(tweenName, obj.x * multiplyX, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "Multiply X", + "name": "MultiplyX", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the objects Y position from its current Y position to a new one.", + "fullName": "Tween objects Y position", + "functionType": "Action", + "name": "AddObjectPositionYTween", + "sentence": "Tween the Y position of _PARAM0_'s elements to _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM6_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectPositionYTween(tweenName, y, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectPositionYTween(tweenName, y, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "To Y", + "name": "Y", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the objects Y position from its current Y position to a new one by adding the X.", + "fullName": "Tween objects relative Y position", + "functionType": "Action", + "name": "AddObjectRelativePositionYTween", + "sentence": "Tween the Y position of _PARAM0_'s elements to current y + _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM6_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const y = eventsFunctionContext.getArgument(\"Y\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectPositionYTween(tweenName, currObj.y + y, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectPositionYTween(tweenName, obj.y + y, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "Add Y", + "name": "Y", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the objects Y position from its current Y position to a new one by multiplying it.", + "fullName": "Tween objects Y position by multiplying it", + "functionType": "Action", + "name": "AddObjectMultiplierPositionYTween", + "sentence": "Tween the Y position of _PARAM0_'s elements to current y * _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM6_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const multiplyY = eventsFunctionContext.getArgument(\"MultiplyY\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectPositionYTween(tweenName, currObj.y * multiplyY, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectPositionYTween(tweenName, obj.y * multiplyY, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "Multiply Y", + "name": "MultiplyY", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the objects height from its current height to a new one.", + "fullName": "Tween objects height", + "functionType": "Action", + "name": "AddObjectHeightTween", + "sentence": "Tween the height of _PARAM0_ to _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM6_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const height = eventsFunctionContext.getArgument(\"Height\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectHeightTween(tweenName, height, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectHeightTween(tweenName, height, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "To height", + "name": "Height", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the objects height from its current height to a new one by adding height.", + "fullName": "Tween objects relative height", + "functionType": "Action", + "name": "AddObjectRelativeHeightTween", + "sentence": "Tween the height of _PARAM0_ to current height + _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM6_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const height = eventsFunctionContext.getArgument(\"Height\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectHeightTween(tweenName, currObj.getHeight() + height, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectHeightTween(tweenName, obj.getHeight() + height, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "Add height", + "name": "Height", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the objects height from its current height to a new one by multiplying it.", + "fullName": "Tween objects height by multiplying it", + "functionType": "Action", + "name": "AddObjectMultiplierHeightTween", + "sentence": "Tween the height of _PARAM0_ to current height * _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM6_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const multiplier = eventsFunctionContext.getArgument(\"Multiplier\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectHeightTween(tweenName, currObj.getHeight() * multiplier, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectHeightTween(tweenName, obj.getHeight() * multiplier, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "Multiply height", + "name": "Multiplier", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the objects height from its current width to a new one.", + "fullName": "Tween objects width", + "functionType": "Action", + "name": "AddObjectWidthTween", + "sentence": "Tween the widthof _PARAM0_ to _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM6_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const width = eventsFunctionContext.getArgument(\"Width\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectWidthTween(tweenName, width, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectWidthTween(tweenName, width, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "To width", + "name": "Width", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the objects height from its current width to a new one by adding width.", + "fullName": "Tween objects relative width", + "functionType": "Action", + "name": "AddObjectRelativeWidthTween", + "sentence": "Tween the widthof _PARAM0_ to current width + _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM6_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const width = eventsFunctionContext.getArgument(\"Width\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectWidthTween(tweenName, currObj.getWidth() + width, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectWidthTween(tweenName, obj.getWidth() + width, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "Add width", + "name": "Width", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the objects width from its current width to a new one by multiplying it.", + "fullName": "Tween objects width by multiplying it", + "functionType": "Action", + "name": "AddObjectMultiplierWidthTween", + "sentence": "Tween the width of _PARAM0_ to current width * _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM6_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const multiplier = eventsFunctionContext.getArgument(\"Multiplier\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectWidthTween(tweenName, currObj.getWidth() * multiplier, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectWidthTween(tweenName, obj.getWidth() * multiplier, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "Multiply width", + "name": "Multiplier", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the objects scale from its current scale to a new one (note: the scale can never be less than 0).", + "fullName": "Tween objects scale", + "functionType": "Action", + "name": "AddObjectScaleTween", + "sentence": "Tween the scale of _PARAM0_ to X-scale: _PARAM3_, Y-scale: _PARAM4_ (from center: _PARAM7_) with easing _PARAM5_ over _PARAM6_ms as _PARAM2_ waiting _PARAM8_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const scaleX = eventsFunctionContext.getArgument(\"ScaleX\");", + "const scaleY = eventsFunctionContext.getArgument(\"ScaleY\");", + "const scaleFromCenter = eventsFunctionContext.getArgument(\"ScaleFromCenter\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectScaleTween(tweenName, scaleX, scaleY, easingFn, duration, false, scaleFromCenter);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectScaleTween(tweenName, scaleX, scaleY, easingFn, duration, false, scaleFromCenter);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "To scale X", + "name": "ScaleX", + "type": "expression" + }, + { + "description": "To scale Y", + "name": "ScaleY", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Scale from center of object", + "name": "ScaleFromCenter", + "type": "yesorno" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the objects X-scale from its current value to a new one (note: the scale can never be less than 0).", + "fullName": "Tween objects X-scale", + "functionType": "Action", + "name": "AddObjectScaleXTween", + "sentence": "Tween the X-scale of _PARAM0_ to _PARAM3_ (from center: _PARAM6_) with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM7_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const scaleX = eventsFunctionContext.getArgument(\"ScaleX\");", + "const scaleFromCenter = eventsFunctionContext.getArgument(\"ScaleFromCenter\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectScaleXTween(tweenName, scaleX, easingFn, duration, false, scaleFromCenter);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectScaleXTween(tweenName, scaleX, easingFn, duration, false, scaleFromCenter);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "To scale X", + "name": "ScaleX", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Scale from center of object", + "name": "ScaleFromCenter", + "type": "yesorno" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the objects Y-scale from its current value to a new one (note: the scale can never be less than 0).", + "fullName": "Tween objects Y-scale", + "functionType": "Action", + "name": "AddObjectScaleYTween", + "sentence": "Tween the Y-scale of _PARAM0_ to _PARAM3_ (from center: _PARAM6_) with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM7_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const scaleY = eventsFunctionContext.getArgument(\"ScaleY\");", + "const scaleFromCenter = eventsFunctionContext.getArgument(\"ScaleFromCenter\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectScaleYTween(tweenName, scaleY, easingFn, duration, false, scaleFromCenter);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectScaleYTween(tweenName, scaleY, easingFn, duration, false, scaleFromCenter);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "To scale Y", + "name": "ScaleY", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Scale from center of object", + "name": "ScaleFromCenter", + "type": "yesorno" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the object opacity from its current value to a new one (note: the value shall stay between 0 and 255).", + "fullName": "Tween objects opacity", + "functionType": "Action", + "name": "AddObjectOpacityTween", + "sentence": "Tween the opacity of _PARAM0_ to _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM6_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const opacity = eventsFunctionContext.getArgument(\"Opacity\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectOpacityTween(tweenName, opacity, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectOpacityTween(tweenName, opacity, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "To opacity", + "name": "Opacity", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the object opacity from its current value to a new one by adding opacity (note: the value shall stay between 0 and 255).", + "fullName": "Tween objects relative opacity", + "functionType": "Action", + "name": "AddObjectRelativeOpacityTween", + "sentence": "Tween the opacity of _PARAM0_ to current opacity + _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM6_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const opacity = eventsFunctionContext.getArgument(\"Opacity\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectOpacityTween(tweenName, currObj.getOpacity() + opacity, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectOpacityTween(tweenName, obj.getOpacity() + opacity, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "Add opacity", + "name": "Opacity", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the object opacity from its current value to a new one by multiplying it (note: the value shall stay between 0 and 255).", + "fullName": "Tween objects opacity by multiplying it", + "functionType": "Action", + "name": "AddObjectMultiplierOpacityTween", + "sentence": "Tween the opacity of _PARAM0_ to current opacity * _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM6_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const multiplier = eventsFunctionContext.getArgument(\"Multiplier\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectOpacityTween(tweenName, currObj.getOpacity() * multiplier, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectOpacityTween(tweenName, obj.getOpacity() * multiplier, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "Multiply opacity", + "name": "Multiplier", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the object color from its current value to a new one. Format: \"128;200;255\" with values between 0 and 255 for red, green and blue.", + "fullName": "Tween objects color", + "functionType": "Action", + "name": "AddObjectColorTween", + "sentence": "Tween the color of _PARAM0_ to _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_, use HSL: _PARAM6_ waiting _PARAM7_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const color = eventsFunctionContext.getArgument(\"Color\");", + "const useHSLColorTransition = eventsFunctionContext.getArgument(\"UseHSLColorTransition\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectColorTween(tweenName, color, easingFn, duration, false, useHSLColorTransition);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectColorTween(tweenName, color, easingFn, duration, false, useHSLColorTransition);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "To color", + "name": "Color", + "type": "string" + }, + { + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Tween on the Hue/Saturation/Lightness (HSL)", + "longDescription": "Useful to have a more natural change between colors.", + "name": "UseHSLColorTransition", + "type": "yesorno" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the object color using Hue/Saturation/Lightness. Hue can be any number, Saturation and Lightness are between 0 and 100. Use -1 for Saturation and Lightness to let them unchanged.", + "fullName": "Tween objects HSL color", + "functionType": "Action", + "name": "AddObjectColorHSLTween", + "sentence": "Tween the color of _PARAM0_ using HSL to H: _PARAM3_ (_PARAM4_), S: _PARAM5_, L: _PARAM6_ with easing _PARAM7_ over _PARAM8_ms as _PARAM2_ waiting _PARAM9_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const hue = eventsFunctionContext.getArgument(\"Hue\");", + "const animateHue = eventsFunctionContext.getArgument(\"AnimateHue\");", + "const saturation = eventsFunctionContext.getArgument(\"Saturation\");", + "const lightness = eventsFunctionContext.getArgument(\"Lightness\");", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "// https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + "tween.addObjectColorHSLTween(tweenName, hue, animateHue, saturation, lightness, easingFn, duration, false);", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addObjectColorHSLTween(tweenName, hue, animateHue, saturation, lightness, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "To Hue", + "name": "Hue", + "type": "expression" + }, + { + "defaultValue": "yes", + "description": "Animate Hue", + "name": "AnimateHue", + "optional": true, + "type": "yesorno" + }, + { + "description": "To Saturation (-1 to ignore)", + "name": "Saturation", + "type": "expression" + }, + { + "description": "To Lightness (-1 to ignore)", + "name": "Lightness", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the text objects character size from its current value to a new one (note: the size can never be less than 1).", + "fullName": "Tween texts size", + "functionType": "Action", + "name": "AddTextObjectCharacterSizeTween", + "sentence": "Tween the character size of _PARAM0_ to _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM6_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const size = eventsFunctionContext.getArgument(\"Size\");", + "", + "let tween = null;", + "let tweenName = null;", + "", + "if (currObj.type == \"TextObject::Text\") {", + " // get attached tween behavior", + " let tween = currObj.getBehavior(\"Tween\");", + " let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addTextObjectCharacterSizeTween(tweenName, size, easingFn, duration, false);", + "}", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addTextObjectCharacterSizeTween(tweenName, size, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " if (obj.type == \"TextObject::Text\") {", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "To character size", + "name": "Size", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the text objects character size from its current value to a new one by adding size (note: the size can never be less than 1).", + "fullName": "Tween texts relative size", + "functionType": "Action", + "name": "AddTextObjectCharacterRelativeSizeTween", + "sentence": "Tween the character size of _PARAM0_ to current size + _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM6_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const size = eventsFunctionContext.getArgument(\"Size\");", + "", + "let tween = null;", + "let tweenName = null;", + "", + "if (currObj.type == \"TextObject::Text\") {", + " // get attached tween behavior", + " let tween = currObj.getBehavior(\"Tween\");", + " let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addTextObjectCharacterSizeTween(tweenName, currObj.getCharacterSize() + size, easingFn, duration, false);", + "}", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addTextObjectCharacterSizeTween(tweenName, obj.getCharacterSize() + size, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " if (obj.type == \"TextObject::Text\") {", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "Add character size", + "name": "Size", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Tweens the text objects character size from its current value to a new one by multiplying it (note: the size can never be less than 1).", + "fullName": "Tween texts size by multiplying it", + "functionType": "Action", + "name": "AddTextObjectCharacterMultiplySizeTween", + "sentence": "Tween the character size of _PARAM0_ to current size * _PARAM3_ with easing _PARAM4_ over _PARAM5_ms as _PARAM2_ waiting _PARAM6_ms in between", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "// get general functions params", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const easingFn = eventsFunctionContext.getArgument(\"Easing\");", + "const duration = eventsFunctionContext.getArgument(\"Duration\");", + "const delay = eventsFunctionContext.getArgument(\"Delay\");", + "", + "// get specific function params", + "const multiplier = eventsFunctionContext.getArgument(\"Multiplier\");", + "", + "let tween = null;", + "let tweenName = null;", + "", + "if (currObj.type == \"TextObject::Text\") {", + " // get attached tween behavior", + " let tween = currObj.getBehavior(\"Tween\");", + " let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addTextObjectCharacterSizeTween(tweenName, currObj.getCharacterSize() * multiplier, easingFn, duration, false);", + "}", + "", + "function delayExecution(obj, tween, tweenName, delay, i) {", + " setTimeout(() => {", + " // https://docs.gdevelop.io/GDJS%20Runtime%20Documentation/classes/gdjs.TweenRuntimeBehavior.html", + " tween.addTextObjectCharacterSizeTween(tweenName, obj.getCharacterSize() * multiplier, easingFn, duration, false);", + " }, delay * i);", + "}", + "", + "let count = 1;", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + "", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " if (obj.type == \"TextObject::Text\") {", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " delayExecution(obj, tween, tweenName, delay, count);", + " count++;", + " }", + " }", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + }, + { + "type": "BuiltinCommonInstructions::Standard", + "conditions": [], + "actions": [] + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "supplementaryInformation": "object", + "type": "string" + }, + { + "description": "Multiply character size", + "name": "Multiplier", + "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 milliseconds", + "name": "Duration", + "type": "expression" + }, + { + "description": "Delay to wait between tweens", + "name": "Delay", + "type": "expression" + } + ], + "objectGroups": [] + }, + { + "description": "Check if the tween animations exist.", + "fullName": "Tweens exist", + "functionType": "Condition", + "name": "TweensExist", + "sentence": "Tweens _PARAM2_ on _PARAM0_ elements exist", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior\r", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];\r", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");\r", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");\r", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();\r", + "\r", + "let exists = true;\r", + "\r", + "// get attached tween behavior\r", + "let tween = currObj.getBehavior(\"Tween\");\r", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;\r", + "\r", + "if (!tween.exists(tweenName)) {\r", + " exists = false;\r", + "}\r", + "\r", + "if (exists) {\r", + " for (let i = 0; i < elementsNames.length; i++) {\r", + " const elementName = elementsNames[i].getAsString();\r", + "\r", + " // get objects by its name\r", + " const objs = runtimeScene.getObjects(elementName);\r", + " for (let j = 0; j < objs.length; j++) {\r", + " const obj = objs[j];\r", + "\r", + " // get attached tween behavior\r", + " tween = obj.getBehavior(\"Tween\");\r", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;\r", + "\r", + " if (!tween.exists(tweenName)) {\r", + " exists = false;\r", + " break;\r", + " }\r", + " }\r", + "\r", + " if (!exists) {\r", + " break;\r", + " }\r", + " }\r", + "}\r", + "\r", + "eventsFunctionContext.returnValue = exists;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if any of the tween animations is currently playing.", + "fullName": "Any tween on elements is playing", + "functionType": "Condition", + "name": "AnyTweenIsPlaying", + "sentence": "Any tween _PARAM2_ on _PARAM0_ elements is playing", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior\r", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];\r", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");\r", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");\r", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();\r", + "\r", + "let anyRunning = false;\r", + "\r", + "// get attached tween behavior\r", + "let tween = currObj.getBehavior(\"Tween\");\r", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;\r", + "\r", + "if (tween.exists(tweenName) && tween.isPlaying(tweenName)) {\r", + " anyRunning = true;\r", + "}\r", + "\r", + "if (!anyRunning) {\r", + " for (let i = 0; i < elementsNames.length; i++) {\r", + " const elementName = elementsNames[i].getAsString();\r", + "\r", + " // get objects by its name\r", + " const objs = runtimeScene.getObjects(elementName);\r", + " for (let j = 0; j < objs.length; j++) {\r", + " const obj = objs[j];\r", + "\r", + " // get attached tween behavior\r", + " tween = obj.getBehavior(\"Tween\");\r", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;\r", + "\r", + " if (tween.exists(tweenName) && tween.isPlaying(tweenName)) {\r", + " anyRunning = true;\r", + " break;\r", + " }\r", + " }\r", + "\r", + " if (anyRunning) {\r", + " break;\r", + " }\r", + " }\r", + "}\r", + "\r", + "eventsFunctionContext.returnValue = anyRunning;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if all of the tween animations are currently playing.", + "fullName": "All tweens on elements are playing", + "functionType": "Condition", + "name": "AllTweensArePlaying", + "sentence": "All tween _PARAM2_ on _PARAM0_ elements are playing", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior\r", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];\r", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");\r", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");\r", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();\r", + "\r", + "let allRunning = true;\r", + "\r", + "// get attached tween behavior\r", + "let tween = currObj.getBehavior(\"Tween\");\r", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;\r", + "\r", + "if (tween.exists(tweenName) && !tween.isPlaying(tweenName)) {\r", + " allRunning = false;\r", + "}\r", + "\r", + "if (anyRunning) {\r", + " for (let i = 0; i < elementsNames.length; i++) {\r", + " const elementName = elementsNames[i].getAsString();\r", + "\r", + " // get objects by its name\r", + " const objs = runtimeScene.getObjects(elementName);\r", + " for (let j = 0; j < objs.length; j++) {\r", + " const obj = objs[j];\r", + "\r", + " // get attached tween behavior\r", + " tween = obj.getBehavior(\"Tween\");\r", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;\r", + "\r", + " if (tween.exists(tweenName) && !tween.isPlaying(tweenName)) {\r", + " allRunning = false;\r", + " break;\r", + " }\r", + " }\r", + "\r", + " if (!allRunning) {\r", + " break;\r", + " }\r", + " }\r", + "}\r", + "\r", + "eventsFunctionContext.returnValue = allRunning;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if any of the tween animations has finished playing.", + "fullName": "Any tween on elements finished playing", + "functionType": "Condition", + "name": "AnyTweenHasFinished", + "sentence": "Any tween _PARAM2_ on _PARAM0_ elements has finished playing", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior\r", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];\r", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");\r", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");\r", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();\r", + "\r", + "let anyFinished = false;\r", + "\r", + "// get attached tween behavior\r", + "let tween = currObj.getBehavior(\"Tween\");\r", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;\r", + "\r", + "if (tween.exists(tweenName) && tween.hasFinished(tweenName)) {\r", + " anyFinished = true;\r", + "}\r", + "\r", + "if (!anyFinished) {\r", + " for (let i = 0; i < elementsNames.length; i++) {\r", + " const elementName = elementsNames[i].getAsString();\r", + "\r", + " // get objects by its name\r", + " const objs = runtimeScene.getObjects(elementName);\r", + " for (let j = 0; j < objs.length; j++) {\r", + " const obj = objs[j];\r", + "\r", + " // get attached tween behavior\r", + " tween = obj.getBehavior(\"Tween\");\r", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;\r", + "\r", + " if (tween.exists(tweenName) && tween.hasFinished(tweenName)) {\r", + " anyFinished = true;\r", + " break;\r", + " }\r", + " }\r", + "\r", + " if (anyFinished) {\r", + " break;\r", + " }\r", + " }\r", + "}\r", + "\r", + "eventsFunctionContext.returnValue = anyFinished;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Check if all of the tween animations have finished playing.", + "fullName": "All tweens on elements finished playing", + "functionType": "Condition", + "name": "AllTweensHaveFinished", + "sentence": "All tween _PARAM2_ on _PARAM0_ elements finished playing", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior\r", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];\r", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");\r", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");\r", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();\r", + "\r", + "let allFinished = true;\r", + "\r", + "// get attached tween behavior\r", + "let tween = currObj.getBehavior(\"Tween\");\r", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;\r", + "\r", + "if (tween.exists(tweenName) && !tween.hasFinished(tweenName)) {\r", + " allFinished = false;\r", + "}\r", + "\r", + "if (allFinished) {\r", + " for (let i = 0; i < elementsNames.length; i++) {\r", + " const elementName = elementsNames[i].getAsString();\r", + "\r", + " // get objects by its name\r", + " const objs = runtimeScene.getObjects(elementName);\r", + " for (let j = 0; j < objs.length; j++) {\r", + " const obj = objs[j];\r", + "\r", + " // get attached tween behavior\r", + " tween = obj.getBehavior(\"Tween\");\r", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;\r", + "\r", + " if (tween.exists(tweenName) && !tween.hasFinished(tweenName)) {\r", + " allFinished = false;\r", + " break;\r", + " }\r", + " }\r", + "\r", + " if (!allFinished) {\r", + " break;\r", + " }\r", + " }\r", + "}\r", + "\r", + "eventsFunctionContext.returnValue = allFinished;" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": false + } + ], + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "type": "string" + } + ], + "objectGroups": [] + }, + { + "description": "Progress of a tween group (between 0.0 and 1.0).", + "fullName": "Progress of a tween group", + "functionType": "Expression", + "name": "Progress", + "sentence": "", + "events": [ + { + "type": "BuiltinCommonInstructions::JsCode", + "inlineCode": [ + "// get the object containing the behavior", + "const currObj = eventsFunctionContext.getObjects(\"Object\")[0];", + "const currBehaviorName = eventsFunctionContext.getBehaviorName(\"Behavior\");", + "const suffix = eventsFunctionContext.getArgument(\"Identifier\");", + "const elementsNames = currObj.getVariables().get(\"__\" + currBehaviorName + \".Elements\").getAllChildrenArray();", + "", + "let cumsum = 0;", + "let count = 0;", + "", + "// get attached tween behavior", + "let tween = currObj.getBehavior(\"Tween\");", + "let tweenName = \"__\" + currBehaviorName + \"_\" + currObj.name + \"_\" + suffix;", + "", + "if (tween.exists(tweenName) && tween.isPlaying(tweenName)) {", + " cumsum += tween.getProgress(tweenName);", + " count ++;", + "}", + "", + "for (let i = 0; i < elementsNames.length; i++) {", + " const elementName = elementsNames[i].getAsString();", + "", + " // get objects by its name", + " const objs = runtimeScene.getObjects(elementName);", + " for (let j = 0; j < objs.length; j++) {", + " const obj = objs[j];", + "", + " // get attached tween behavior", + " tween = obj.getBehavior(\"Tween\");", + " tweenName = \"__\" + currBehaviorName + \"_\" + obj.name + \"_\" + j + \"_\" + suffix;", + "", + " if (tween.exists(tweenName) && tween.isPlaying(tweenName)) {", + " cumsum += tween.getProgress(tweenName);", + " count ++;", + " }", + " }", + "}", + "", + "if (count == 0) {", + " console.log(count);", + " eventsFunctionContext.returnValue = 1.0;", + "}", + "else {", + " console.log(cumsum / count);", + " eventsFunctionContext.returnValue = cumsum / count;", + "}" + ], + "parameterObjects": "", + "useStrict": true, + "eventsSheetExpanded": true + } + ], + "expressionType": { + "type": "expression" + }, + "parameters": [ + { + "description": "Object", + "name": "Object", + "type": "object" + }, + { + "description": "Behavior", + "name": "Behavior", + "supplementaryInformation": "TweenGroup::TweenGroup", + "type": "behavior" + }, + { + "description": "Tween Identifier", + "name": "Identifier", + "type": "string" + } + ], + "objectGroups": [] + } + ], + "propertyDescriptors": [ + { + "value": "", + "type": "Behavior", + "label": "Tween behavior", + "description": "", + "group": "", + "extraInformation": [ + "Tween::TweenBehavior" + ], + "hidden": false, + "name": "Tween" + } + ], + "sharedPropertyDescriptors": [] + } + ], + "eventsBasedObjects": [] +} \ No newline at end of file