Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

New extension: Bounce When Clicked #1391

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
322 changes: 322 additions & 0 deletions extensions/community/BounceWhenClicked.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,322 @@
{
"author": "",
"category": "Visual effect",
"extensionNamespace": "",
"fullName": "Bounce When Clicked",
"helpPath": "",
"iconUrl": "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIiBpZD0ibWRpLWN1cnNvci1kZWZhdWx0LWNsaWNrIiB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCI+PHBhdGggZD0iTTEwLjc2LDguNjlBMC43NiwwLjc2IDAgMCwwIDEwLDkuNDVWMjAuOUMxMCwyMS4zMiAxMC4zNCwyMS42NiAxMC43NiwyMS42NkMxMC45NSwyMS42NiAxMS4xMSwyMS42IDExLjI0LDIxLjVMMTMuMTUsMTkuOTVMMTQuODEsMjMuNTdDMTQuOTQsMjMuODQgMTUuMjEsMjQgMTUuNSwyNEMxNS42MSwyNCAxNS43MiwyNCAxNS44MywyMy45MkwxOC41OSwyMi42NEMxOC45NywyMi40NiAxOS4xNSwyMiAxOC45NSwyMS42M0wxNy4yOCwxOEwxOS42OSwxNy41NUMxOS44NSwxNy41IDIwLDE3LjQzIDIwLjEyLDE3LjI5QzIwLjM5LDE2Ljk3IDIwLjM1LDE2LjUgMjAsMTYuMjFMMTEuMjYsOC44NkwxMS4yNSw4Ljg3QzExLjEyLDguNzYgMTAuOTUsOC42OSAxMC43Niw4LjY5TTE1LDEwVjhIMjBWMTBIMTVNMTMuODMsNC43NkwxNi42NiwxLjkzTDE4LjA3LDMuMzRMMTUuMjQsNi4xN0wxMy44Myw0Ljc2TTEwLDBIMTJWNUgxMFYwTTMuOTMsMTQuNjZMNi43NiwxMS44M0w4LjE3LDEzLjI0TDUuMzQsMTYuMDdMMy45MywxNC42Nk0zLjkzLDMuMzRMNS4zNCwxLjkzTDguMTcsNC43Nkw2Ljc2LDYuMTdMMy45MywzLjM0TTcsMTBIMlY4SDdWMTAiIC8+PC9zdmc+",
"name": "BounceWhenClicked",
"previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/acee277d95ba01697e6a59ea80322a918e5a6f7cba90712d8b3f238b2a0ed0f9_cursor-default-click.svg",
"shortDescription": "Bounces the object when clicked.",
"version": "0.0.2",
"description": [
"Bounces the object when clicked to give the player a visual indicator that this element has been clicked.",
"",
"Features",
"- Customizable bounce down scale",
"- Customizable bounce up & down times",
"- Customizable bounce up & down easing"
],
"tags": [
"bounce",
"click",
"cursor",
"click indicator",
"touch"
],
"authorIds": [
"AHdLflpEItaEmt986CI598kw2sx1"
],
"dependencies": [],
"globalVariables": [],
"sceneVariables": [
{
"name": "BounceWhenClicked",
"type": "structure",
"children": [
{
"folded": true,
"name": "ObjectHeight",
"type": "number",
"value": 0
},
{
"folded": true,
"name": "ObjectWidth",
"type": "number",
"value": 0
},
{
"folded": true,
"name": "ScaleValue",
"type": "number",
"value": 0
}
]
}
],
"eventsFunctions": [],
"eventsBasedBehaviors": [
{
"description": "Bounces the object when clicked to give the player a visual indicator that this element has been clicked.",
"fullName": "Bounce When Clicked",
"name": "BounceWhenClicked",
"objectType": "Sprite",
"eventsFunctions": [
{
"fullName": "",
"functionType": "Action",
"name": "doStepPreEvents",
"sentence": "",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "SourisSurObjet"
},
"parameters": [
"Object",
"",
"",
""
]
}
],
"actions": [],
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [
{
"type": {
"value": "HasAnyTouchOrMouseStarted"
},
"parameters": [
""
]
},
{
"type": {
"inverted": true,
"value": "Tween::IsPlaying"
},
"parameters": [
"Object",
"Property",
"\"uiclick\""
]
}
],
"actions": [
{
"type": {
"value": "SetNumberVariable"
},
"parameters": [
"BounceWhenClicked.ScaleValue",
"=",
"Object.Scale::Value()"
]
},
{
"type": {
"value": "Tween::TweenBehavior::AddObjectScaleTween3"
},
"parameters": [
"Object",
"Property",
"\"uiclick\"",
"BounceWhenClicked.ScaleValue * PushDownScale",
"PushDownTweenStyle",
"PushDownTime",
"",
"yes"
]
},
{
"type": {
"value": "Wait"
},
"parameters": [
"0.05"
]
},
{
"type": {
"value": "Tween::TweenBehavior::AddObjectScaleTween3"
},
"parameters": [
"Object",
"Property",
"\"uiclick\"",
"BounceWhenClicked.ScaleValue",
"PushDownTweenStyle",
"PushUpTime",
"",
"yes"
]
}
]
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"supplementaryInformation": "Sprite",
"type": "object"
},
{
"description": "Behavior",
"name": "Behavior",
"supplementaryInformation": "BounceWhenClicked::BounceWhenClicked",
"type": "behavior"
}
],
"objectGroups": []
}
],
"propertyDescriptors": [
{
"value": "",
"type": "Behavior",
"label": "",
"description": "",
"group": "",
"extraInformation": [
"Tween::TweenBehavior"
],
"name": "Property"
},
{
"value": "0.8",
"type": "Number",
"unit": "Dimensionless",
"label": "Push Down Scale",
"description": "The scale of the tweened object when being pushed",
"group": "",
"extraInformation": [],
"name": "PushDownScale"
},
{
"value": "0.05",
"type": "Number",
"unit": "Second",
"label": "Push Down Time",
"description": "The time it takes to reach the object's push down scale",
"group": "",
"extraInformation": [],
"name": "PushDownTime"
},
{
"value": "0.1",
"type": "Number",
"unit": "Second",
"label": "Push Up Time",
"description": "The time it takes to reach the object's original size",
"group": "",
"extraInformation": [],
"name": "PushUpTime"
},
{
"value": "easeOutQuad",
"type": "Choice",
"label": "",
"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"
],
"advanced": true,
"name": "PushDownTweenStyle"
},
{
"value": "easeOutQuad",
"type": "Choice",
"label": "",
"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"
],
"advanced": true,
"name": "PushUpTweenStyle"
}
],
"sharedPropertyDescriptors": []
}
],
"eventsBasedObjects": []
}