|
8 | 8 | "name": "CurvedMovement", |
9 | 9 | "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Graphic Design/Graphic Design_bezier_curve.svg", |
10 | 10 | "shortDescription": "Move objects on curved paths.", |
11 | | - "version": "1.0.5", |
| 11 | + "version": "1.1.0", |
12 | 12 | "description": [ |
13 | 13 | "This extension allows to move objects on Bézier curve paths.", |
14 | 14 | "- Paths can be built dynamically or from predetermined paths in SVG format.", |
|
5770 | 5770 | "objectGroups": [] |
5771 | 5771 | }, |
5772 | 5772 | { |
5773 | | - "description": "the length between the trajectory origin and the current position.", |
| 5773 | + "description": "the length between the trajectory origin and the current position without counting the loops.", |
| 5774 | + "fullName": "Position on the loop", |
| 5775 | + "functionType": "ExpressionAndCondition", |
| 5776 | + "name": "PositionOnLoop", |
| 5777 | + "sentence": "the length from the trajectory origin in the current loop", |
| 5778 | + "events": [ |
| 5779 | + { |
| 5780 | + "type": "BuiltinCommonInstructions::Standard", |
| 5781 | + "conditions": [], |
| 5782 | + "actions": [ |
| 5783 | + { |
| 5784 | + "type": { |
| 5785 | + "value": "SetReturnNumber" |
| 5786 | + }, |
| 5787 | + "parameters": [ |
| 5788 | + "mod(Object.Behavior::PropertyCurrentLength(), Object.Behavior::TotalLength())" |
| 5789 | + ] |
| 5790 | + } |
| 5791 | + ] |
| 5792 | + } |
| 5793 | + ], |
| 5794 | + "expressionType": { |
| 5795 | + "type": "expression" |
| 5796 | + }, |
| 5797 | + "parameters": [ |
| 5798 | + { |
| 5799 | + "description": "Object", |
| 5800 | + "name": "Object", |
| 5801 | + "type": "object" |
| 5802 | + }, |
| 5803 | + { |
| 5804 | + "description": "Behavior", |
| 5805 | + "name": "Behavior", |
| 5806 | + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", |
| 5807 | + "type": "behavior" |
| 5808 | + } |
| 5809 | + ], |
| 5810 | + "objectGroups": [] |
| 5811 | + }, |
| 5812 | + { |
| 5813 | + "description": "the number time the object loop the trajectory.", |
| 5814 | + "fullName": "Current loop", |
| 5815 | + "functionType": "ExpressionAndCondition", |
| 5816 | + "name": "Loop", |
| 5817 | + "sentence": "the current loop", |
| 5818 | + "events": [ |
| 5819 | + { |
| 5820 | + "type": "BuiltinCommonInstructions::Standard", |
| 5821 | + "conditions": [], |
| 5822 | + "actions": [ |
| 5823 | + { |
| 5824 | + "type": { |
| 5825 | + "value": "SetReturnNumber" |
| 5826 | + }, |
| 5827 | + "parameters": [ |
| 5828 | + "ceil(Object.Behavior::PropertyCurrentLength() / Object.Behavior::TotalLength())" |
| 5829 | + ] |
| 5830 | + } |
| 5831 | + ] |
| 5832 | + } |
| 5833 | + ], |
| 5834 | + "expressionType": { |
| 5835 | + "type": "expression" |
| 5836 | + }, |
| 5837 | + "parameters": [ |
| 5838 | + { |
| 5839 | + "description": "Object", |
| 5840 | + "name": "Object", |
| 5841 | + "type": "object" |
| 5842 | + }, |
| 5843 | + { |
| 5844 | + "description": "Behavior", |
| 5845 | + "name": "Behavior", |
| 5846 | + "supplementaryInformation": "CurvedMovement::SpeedPathMovement", |
| 5847 | + "type": "behavior" |
| 5848 | + } |
| 5849 | + ], |
| 5850 | + "objectGroups": [] |
| 5851 | + }, |
| 5852 | + { |
| 5853 | + "description": "the length between the trajectory origin and the current position counting the loops.", |
5774 | 5854 | "fullName": "Position on the path", |
5775 | 5855 | "functionType": "ExpressionAndCondition", |
5776 | 5856 | "name": "PositionOnPath", |
5777 | | - "sentence": "the length from the trajectory origin", |
| 5857 | + "sentence": "the length from the trajectory origin counting the loops", |
5778 | 5858 | "events": [ |
5779 | 5859 | { |
5780 | 5860 | "type": "BuiltinCommonInstructions::Standard", |
|
5867 | 5947 | "Object", |
5868 | 5948 | "Behavior", |
5869 | 5949 | "=", |
5870 | | - "mod(GetArgumentAsNumber(\"Value\"), Object.Behavior::TotalLength())" |
| 5950 | + "GetArgumentAsNumber(\"Value\")" |
5871 | 5951 | ] |
5872 | 5952 | } |
5873 | 5953 | ] |
|
6004 | 6084 | "fullName": "Current length", |
6005 | 6085 | "functionType": "Condition", |
6006 | 6086 | "name": "CheckPositionOnPath", |
| 6087 | + "private": true, |
6007 | 6088 | "sentence": "_PARAM0_ is less than _PARAM2_ pixels away from the trajectory origin", |
6008 | 6089 | "events": [ |
6009 | 6090 | { |
|
6014 | 6095 | "value": "BuiltinCommonInstructions::CompareNumbers" |
6015 | 6096 | }, |
6016 | 6097 | "parameters": [ |
6017 | | - "Object.Behavior::PositionOnPath()", |
| 6098 | + "Object.Behavior::PositionOnLoop()", |
6018 | 6099 | "<", |
6019 | 6100 | "GetArgumentAsNumber(\"Length\")" |
6020 | 6101 | ] |
|
6318 | 6399 | "subInstructions": [ |
6319 | 6400 | { |
6320 | 6401 | "type": { |
6321 | | - "value": "CurvedMovement::SpeedPathMovement::PropertySpeed" |
6322 | | - }, |
6323 | | - "parameters": [ |
6324 | | - "Object", |
6325 | | - "Behavior", |
6326 | | - ">", |
6327 | | - "0" |
6328 | | - ] |
| 6402 | + "value": "CurvedMovement::SpeedPathMovement::PropertySpeed" |
| 6403 | + }, |
| 6404 | + "parameters": [ |
| 6405 | + "Object", |
| 6406 | + "Behavior", |
| 6407 | + ">", |
| 6408 | + "0" |
| 6409 | + ] |
6329 | 6410 | }, |
6330 | 6411 | { |
6331 | 6412 | "type": { |
|
6367 | 6448 | "subInstructions": [ |
6368 | 6449 | { |
6369 | 6450 | "type": { |
6370 | | - "value": "CurvedMovement::SpeedPathMovement::PropertySpeed" |
6371 | | - }, |
6372 | | - "parameters": [ |
6373 | | - "Object", |
6374 | | - "Behavior", |
6375 | | - "<", |
6376 | | - "0" |
6377 | | - ] |
| 6451 | + "value": "CurvedMovement::SpeedPathMovement::PropertySpeed" |
| 6452 | + }, |
| 6453 | + "parameters": [ |
| 6454 | + "Object", |
| 6455 | + "Behavior", |
| 6456 | + "<", |
| 6457 | + "0" |
| 6458 | + ] |
6378 | 6459 | }, |
6379 | 6460 | { |
6380 | 6461 | "type": { |
|
6386 | 6467 | "<", |
6387 | 6468 | "0" |
6388 | 6469 | ] |
| 6470 | + } |
| 6471 | + ] |
6389 | 6472 | } |
6390 | 6473 | ] |
6391 | 6474 | } |
6392 | 6475 | ] |
6393 | 6476 | } |
6394 | | - ] |
6395 | | - } |
6396 | 6477 | ], |
6397 | 6478 | "actions": [ |
6398 | 6479 | { |
|
7089 | 7170 | "value": "SetReturnNumber" |
7090 | 7171 | }, |
7091 | 7172 | "parameters": [ |
7092 | | - "mod(Object.Behavior::PropertyCurrentLength(), Object.Behavior::PathLength())" |
| 7173 | + "mod(Object.Behavior::PositionOnLoop(), Object.Behavior::PathLength())" |
7093 | 7174 | ] |
7094 | 7175 | } |
7095 | 7176 | ] |
|
7179 | 7260 | "value": "SetReturnNumber" |
7180 | 7261 | }, |
7181 | 7262 | "parameters": [ |
7182 | | - "floor(Object.Behavior::PropertyCurrentLength() / Object.Behavior::PathLength())" |
| 7263 | + "floor(Object.Behavior::PositionOnLoop() / Object.Behavior::PathLength())" |
7183 | 7264 | ] |
7184 | 7265 | } |
7185 | 7266 | ] |
|
7257 | 7338 | "value": "SetReturnNumber" |
7258 | 7339 | }, |
7259 | 7340 | "parameters": [ |
7260 | | - "mod(Object.Behavior::PropertyCurrentLength(), Object.Behavior::TotalLength())" |
| 7341 | + "mod(Object.Behavior::PositionOnLoop(), Object.Behavior::TotalLength())" |
7261 | 7342 | ] |
7262 | 7343 | } |
7263 | 7344 | ] |
|
0 commit comments