|
9 | 9 | "name": "TopDownMovementAnimator", |
10 | 10 | "previewIconUrl": "https://asset-resources.gdevelop.io/public-resources/Icons/Glyphster Pack/Master/SVG/Arrows/a6026156355ae5f03613b03971e4ddb50d0c95b8901e7a21edc57f33f0032e42_Arrows_thin_arrows_all_directions_cross.svg", |
11 | 11 | "shortDescription": "Change the animation according to the movement direction.", |
12 | | - "version": "0.2.1", |
| 12 | + "version": "0.2.2", |
13 | 13 | "description": "Change the animation according to the movement direction.", |
14 | 14 | "origin": { |
15 | 15 | "identifier": "TopDownMovementAnimator", |
|
110 | 110 | ] |
111 | 111 | } |
112 | 112 | ] |
| 113 | + }, |
| 114 | + { |
| 115 | + "type": "BuiltinCommonInstructions::Standard", |
| 116 | + "conditions": [], |
| 117 | + "actions": [ |
| 118 | + { |
| 119 | + "type": { |
| 120 | + "value": "TopDownMovementAnimator::TopDownMovementAnimator::UpdateAnimation" |
| 121 | + }, |
| 122 | + "parameters": [ |
| 123 | + "Object", |
| 124 | + "Behavior", |
| 125 | + "" |
| 126 | + ] |
| 127 | + } |
| 128 | + ] |
113 | 129 | } |
114 | 130 | ], |
115 | 131 | "parameters": [ |
|
139 | 155 | "actions": [ |
140 | 156 | { |
141 | 157 | "type": { |
142 | | - "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetAnimationDirection" |
| 158 | + "value": "TopDownMovementAnimator::TopDownMovementAnimator::UpdateAnimation" |
143 | 159 | }, |
144 | 160 | "parameters": [ |
145 | 161 | "Object", |
146 | 162 | "Behavior", |
147 | | - "AnimationName", |
148 | | - "Object.Behavior::Direction()", |
149 | 163 | "" |
150 | 164 | ] |
151 | 165 | } |
|
172 | 186 | "functionType": "Action", |
173 | 187 | "name": "doStepPostEvents", |
174 | 188 | "sentence": "", |
| 189 | + "events": [ |
| 190 | + { |
| 191 | + "type": "BuiltinCommonInstructions::Standard", |
| 192 | + "conditions": [], |
| 193 | + "actions": [ |
| 194 | + { |
| 195 | + "type": { |
| 196 | + "value": "TopDownMovementAnimator::TopDownMovementAnimator::UpdateAnimation" |
| 197 | + }, |
| 198 | + "parameters": [ |
| 199 | + "Object", |
| 200 | + "Behavior", |
| 201 | + "" |
| 202 | + ] |
| 203 | + } |
| 204 | + ] |
| 205 | + } |
| 206 | + ], |
| 207 | + "parameters": [ |
| 208 | + { |
| 209 | + "description": "Object", |
| 210 | + "name": "Object", |
| 211 | + "type": "object" |
| 212 | + }, |
| 213 | + { |
| 214 | + "description": "Behavior", |
| 215 | + "name": "Behavior", |
| 216 | + "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", |
| 217 | + "type": "behavior" |
| 218 | + } |
| 219 | + ], |
| 220 | + "objectGroups": [] |
| 221 | + }, |
| 222 | + { |
| 223 | + "description": "Update the animation according to the object direction.", |
| 224 | + "fullName": "Update animation", |
| 225 | + "functionType": "Action", |
| 226 | + "name": "UpdateAnimation", |
| 227 | + "private": true, |
| 228 | + "sentence": "Update the animation of _PARAM0_", |
175 | 229 | "events": [ |
176 | 230 | { |
177 | 231 | "type": "BuiltinCommonInstructions::Standard", |
|
277 | 331 | "parameters": [ |
278 | 332 | "Object", |
279 | 333 | "Behavior", |
280 | | - "AnimationName", |
281 | 334 | "NewAnimationDirection", |
282 | 335 | "" |
283 | 336 | ] |
|
374 | 427 | "actions": [ |
375 | 428 | { |
376 | 429 | "type": { |
377 | | - "value": "TopDownMovementAnimator::TopDownMovementAnimator::SetAnimationDirection" |
| 430 | + "value": "SetStringVariable" |
| 431 | + }, |
| 432 | + "parameters": [ |
| 433 | + "AnimationName", |
| 434 | + "=", |
| 435 | + "Value" |
| 436 | + ] |
| 437 | + }, |
| 438 | + { |
| 439 | + "type": { |
| 440 | + "value": "TopDownMovementAnimator::TopDownMovementAnimator::UpdateAnimationName" |
378 | 441 | }, |
379 | 442 | "parameters": [ |
380 | 443 | "Object", |
381 | 444 | "Behavior", |
382 | | - "Value", |
383 | | - "AnimationDirection", |
384 | 445 | "" |
385 | 446 | ] |
386 | 447 | } |
|
960 | 1021 | "objectGroups": [] |
961 | 1022 | }, |
962 | 1023 | { |
963 | | - "description": "Change the animation name and direction of the object.", |
| 1024 | + "description": "Change the animation direction of the object.", |
964 | 1025 | "fullName": "Animation name and direction", |
965 | 1026 | "functionType": "Action", |
966 | 1027 | "name": "SetAnimationDirection", |
967 | 1028 | "private": true, |
968 | | - "sentence": "Change the animation of _PARAM0_ to name: _PARAM2_ and direction: _PARAM3_", |
| 1029 | + "sentence": "Change the animation direction of _PARAM0_ to _PARAM2_", |
969 | 1030 | "events": [ |
970 | 1031 | { |
971 | 1032 | "type": "BuiltinCommonInstructions::Comment", |
|
985 | 1046 | "actions": [ |
986 | 1047 | { |
987 | 1048 | "type": { |
988 | | - "value": "SetStringVariable" |
| 1049 | + "value": "SetNumberVariable" |
989 | 1050 | }, |
990 | 1051 | "parameters": [ |
991 | | - "AnimationName", |
| 1052 | + "AnimationDirection", |
992 | 1053 | "=", |
993 | | - "NewName" |
| 1054 | + "mod(mod(round(NewDirection), DirectionCount) + DirectionCount, DirectionCount)" |
994 | 1055 | ] |
995 | 1056 | }, |
996 | 1057 | { |
997 | 1058 | "type": { |
998 | 1059 | "value": "SetNumberVariable" |
999 | 1060 | }, |
1000 | 1061 | "parameters": [ |
1001 | | - "AnimationDirection", |
| 1062 | + "AnimationElapsedTime", |
1002 | 1063 | "=", |
1003 | | - "mod(mod(round(NewDirection), DirectionCount) + DirectionCount, DirectionCount)" |
| 1064 | + "Object.Animation::ElapsedTime()" |
1004 | 1065 | ] |
1005 | 1066 | }, |
1006 | 1067 | { |
1007 | 1068 | "type": { |
1008 | | - "value": "SetNumberVariable" |
| 1069 | + "value": "TopDownMovementAnimator::TopDownMovementAnimator::UpdateAnimationName" |
1009 | 1070 | }, |
1010 | 1071 | "parameters": [ |
1011 | | - "AnimationElapsedTime", |
1012 | | - "=", |
1013 | | - "Object.Animation::ElapsedTime()" |
| 1072 | + "Object", |
| 1073 | + "Behavior", |
| 1074 | + "" |
1014 | 1075 | ] |
1015 | 1076 | }, |
| 1077 | + { |
| 1078 | + "type": { |
| 1079 | + "value": "AnimatableCapability::AnimatableBehavior::SetElapsedTime" |
| 1080 | + }, |
| 1081 | + "parameters": [ |
| 1082 | + "Object", |
| 1083 | + "Animation", |
| 1084 | + "=", |
| 1085 | + "AnimationElapsedTime" |
| 1086 | + ] |
| 1087 | + } |
| 1088 | + ], |
| 1089 | + "variables": [ |
| 1090 | + { |
| 1091 | + "folded": true, |
| 1092 | + "name": "AnimationElapsedTime", |
| 1093 | + "type": "number", |
| 1094 | + "value": 0 |
| 1095 | + } |
| 1096 | + ] |
| 1097 | + } |
| 1098 | + ], |
| 1099 | + "parameters": [ |
| 1100 | + { |
| 1101 | + "description": "Object", |
| 1102 | + "name": "Object", |
| 1103 | + "type": "object" |
| 1104 | + }, |
| 1105 | + { |
| 1106 | + "description": "Behavior", |
| 1107 | + "name": "Behavior", |
| 1108 | + "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", |
| 1109 | + "type": "behavior" |
| 1110 | + }, |
| 1111 | + { |
| 1112 | + "description": "Direction", |
| 1113 | + "name": "NewDirection", |
| 1114 | + "type": "expression" |
| 1115 | + } |
| 1116 | + ], |
| 1117 | + "objectGroups": [] |
| 1118 | + }, |
| 1119 | + { |
| 1120 | + "description": "Update the animation name.", |
| 1121 | + "fullName": "Update animation name", |
| 1122 | + "functionType": "Action", |
| 1123 | + "name": "UpdateAnimationName", |
| 1124 | + "private": true, |
| 1125 | + "sentence": "Update the animation name of _PARAM0_", |
| 1126 | + "events": [ |
| 1127 | + { |
| 1128 | + "type": "BuiltinCommonInstructions::Standard", |
| 1129 | + "conditions": [], |
| 1130 | + "actions": [ |
1016 | 1131 | { |
1017 | 1132 | "type": { |
1018 | 1133 | "value": "AnimatableCapability::AnimatableBehavior::SetName" |
|
1066 | 1181 | ] |
1067 | 1182 | } |
1068 | 1183 | ] |
1069 | | - }, |
1070 | | - { |
1071 | | - "type": "BuiltinCommonInstructions::Standard", |
1072 | | - "conditions": [], |
1073 | | - "actions": [ |
1074 | | - { |
1075 | | - "type": { |
1076 | | - "value": "AnimatableCapability::AnimatableBehavior::SetElapsedTime" |
1077 | | - }, |
1078 | | - "parameters": [ |
1079 | | - "Object", |
1080 | | - "Animation", |
1081 | | - "=", |
1082 | | - "AnimationElapsedTime" |
1083 | | - ] |
1084 | | - } |
1085 | | - ] |
1086 | | - } |
1087 | | - ], |
1088 | | - "variables": [ |
1089 | | - { |
1090 | | - "folded": true, |
1091 | | - "name": "AnimationElapsedTime", |
1092 | | - "type": "number", |
1093 | | - "value": 0 |
1094 | 1184 | } |
1095 | 1185 | ] |
1096 | 1186 | } |
|
1106 | 1196 | "name": "Behavior", |
1107 | 1197 | "supplementaryInformation": "TopDownMovementAnimator::TopDownMovementAnimator", |
1108 | 1198 | "type": "behavior" |
1109 | | - }, |
1110 | | - { |
1111 | | - "description": "Name", |
1112 | | - "name": "NewName", |
1113 | | - "type": "string" |
1114 | | - }, |
1115 | | - { |
1116 | | - "description": "Direction", |
1117 | | - "name": "NewDirection", |
1118 | | - "type": "expression" |
1119 | 1199 | } |
1120 | 1200 | ], |
1121 | 1201 | "objectGroups": [] |
|
0 commit comments