Skip to content
Merged
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
188 changes: 134 additions & 54 deletions extensions/community/TopDownMovementAnimator.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"name": "TopDownMovementAnimator",
"previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Glyphster Pack/Master/SVG/Arrows/a6026156355ae5f03613b03971e4ddb50d0c95b8901e7a21edc57f33f0032e42_Arrows_thin_arrows_all_directions_cross.svg",
"shortDescription": "Change the animation according to the movement direction.",
"version": "0.2.1",
"version": "0.2.2",
"description": "Change the animation according to the movement direction.",
"origin": {
"identifier": "TopDownMovementAnimator",
Expand Down Expand Up @@ -110,6 +110,22 @@
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"value": "TopDownMovementAnimator::TopDownMovementAnimator::UpdateAnimation"
},
"parameters": [
"Object",
"Behavior",
""
]
}
]
}
],
"parameters": [
Expand Down Expand Up @@ -139,13 +155,11 @@
"actions": [
{
"type": {
"value": "TopDownMovementAnimator::TopDownMovementAnimator::SetAnimationDirection"
"value": "TopDownMovementAnimator::TopDownMovementAnimator::UpdateAnimation"
},
"parameters": [
"Object",
"Behavior",
"AnimationName",
"Object.Behavior::Direction()",
""
]
}
Expand All @@ -172,6 +186,46 @@
"functionType": "Action",
"name": "doStepPostEvents",
"sentence": "",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"value": "TopDownMovementAnimator::TopDownMovementAnimator::UpdateAnimation"
},
"parameters": [
"Object",
"Behavior",
""
]
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"type": "object"
},
{
"description": "Behavior",
"name": "Behavior",
"supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator",
"type": "behavior"
}
],
"objectGroups": []
},
{
"description": "Update the animation according to the object direction.",
"fullName": "Update animation",
"functionType": "Action",
"name": "UpdateAnimation",
"private": true,
"sentence": "Update the animation of _PARAM0_",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
Expand Down Expand Up @@ -277,7 +331,6 @@
"parameters": [
"Object",
"Behavior",
"AnimationName",
"NewAnimationDirection",
""
]
Expand Down Expand Up @@ -374,13 +427,21 @@
"actions": [
{
"type": {
"value": "TopDownMovementAnimator::TopDownMovementAnimator::SetAnimationDirection"
"value": "SetStringVariable"
},
"parameters": [
"AnimationName",
"=",
"Value"
]
},
{
"type": {
"value": "TopDownMovementAnimator::TopDownMovementAnimator::UpdateAnimationName"
},
"parameters": [
"Object",
"Behavior",
"Value",
"AnimationDirection",
""
]
}
Expand Down Expand Up @@ -960,12 +1021,12 @@
"objectGroups": []
},
{
"description": "Change the animation name and direction of the object.",
"description": "Change the animation direction of the object.",
"fullName": "Animation name and direction",
"functionType": "Action",
"name": "SetAnimationDirection",
"private": true,
"sentence": "Change the animation of _PARAM0_ to name: _PARAM2_ and direction: _PARAM3_",
"sentence": "Change the animation direction of _PARAM0_ to _PARAM2_",
"events": [
{
"type": "BuiltinCommonInstructions::Comment",
Expand All @@ -985,34 +1046,88 @@
"actions": [
{
"type": {
"value": "SetStringVariable"
"value": "SetNumberVariable"
},
"parameters": [
"AnimationName",
"AnimationDirection",
"=",
"NewName"
"mod(mod(round(NewDirection), DirectionCount) + DirectionCount, DirectionCount)"
]
},
{
"type": {
"value": "SetNumberVariable"
},
"parameters": [
"AnimationDirection",
"AnimationElapsedTime",
"=",
"mod(mod(round(NewDirection), DirectionCount) + DirectionCount, DirectionCount)"
"Object.Animation::ElapsedTime()"
]
},
{
"type": {
"value": "SetNumberVariable"
"value": "TopDownMovementAnimator::TopDownMovementAnimator::UpdateAnimationName"
},
"parameters": [
"AnimationElapsedTime",
"=",
"Object.Animation::ElapsedTime()"
"Object",
"Behavior",
""
]
},
{
"type": {
"value": "AnimatableCapability::AnimatableBehavior::SetElapsedTime"
},
"parameters": [
"Object",
"Animation",
"=",
"AnimationElapsedTime"
]
}
],
"variables": [
{
"folded": true,
"name": "AnimationElapsedTime",
"type": "number",
"value": 0
}
]
}
],
"parameters": [
{
"description": "Object",
"name": "Object",
"type": "object"
},
{
"description": "Behavior",
"name": "Behavior",
"supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator",
"type": "behavior"
},
{
"description": "Direction",
"name": "NewDirection",
"type": "expression"
}
],
"objectGroups": []
},
{
"description": "Update the animation name.",
"fullName": "Update animation name",
"functionType": "Action",
"name": "UpdateAnimationName",
"private": true,
"sentence": "Update the animation name of _PARAM0_",
"events": [
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"value": "AnimatableCapability::AnimatableBehavior::SetName"
Expand Down Expand Up @@ -1066,31 +1181,6 @@
]
}
]
},
{
"type": "BuiltinCommonInstructions::Standard",
"conditions": [],
"actions": [
{
"type": {
"value": "AnimatableCapability::AnimatableBehavior::SetElapsedTime"
},
"parameters": [
"Object",
"Animation",
"=",
"AnimationElapsedTime"
]
}
]
}
],
"variables": [
{
"folded": true,
"name": "AnimationElapsedTime",
"type": "number",
"value": 0
}
]
}
Expand All @@ -1106,16 +1196,6 @@
"name": "Behavior",
"supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator",
"type": "behavior"
},
{
"description": "Name",
"name": "NewName",
"type": "string"
},
{
"description": "Direction",
"name": "NewDirection",
"type": "expression"
}
],
"objectGroups": []
Expand Down