|
8 | 8 | "name": "RectangleMovement", |
9 | 9 | "previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/shape-rectangle-plus.svg", |
10 | 10 | "shortDescription": "Move objects in a rectangular pattern.", |
11 | | - "version": "1.1.1", |
| 11 | + "version": "1.2.0", |
12 | 12 | "description": [ |
13 | 13 | "Move objects in a rectangular pattern with easing functions from the Tween extension.", |
14 | 14 | "", |
15 | 15 | "It can be used for:", |
16 | 16 | "", |
17 | 17 | "- Moveable platforms", |
18 | 18 | "- Enemy movement patterns", |
19 | | - "- Moving along the border of another object", |
| 19 | + "- Moving along the border of another object (inside, center, outside)", |
20 | 20 | "", |
21 | 21 | "The platformer example uses this extension ([open the project online](https://editor.gdevelop.io/?project=example://platformer)).", |
22 | 22 | "", |
|
217 | 217 | "fullName": "Update rectangular movement to follow the border of an object", |
218 | 218 | "functionType": "Action", |
219 | 219 | "name": "MoveAlongBorderOfObject", |
220 | | - "sentence": "Update rectangular movement of _PARAM1_ to follow the border of _PARAM3_", |
| 220 | + "sentence": "Update rectangular movement of _PARAM1_ to follow the border of _PARAM3_. Position on border: _PARAM4_", |
221 | 221 | "events": [ |
222 | 222 | { |
223 | 223 | "colorB": 228, |
|
432 | 432 | ] |
433 | 433 | } |
434 | 434 | ], |
435 | | - "actions": [ |
436 | | - { |
437 | | - "type": { |
438 | | - "value": "RectangleMovement::RectangleMovement::SetTop" |
439 | | - }, |
440 | | - "parameters": [ |
441 | | - "MovingObject", |
442 | | - "RectangleMovement", |
443 | | - "CenterObject.BoundingBoxTop()", |
444 | | - "" |
445 | | - ] |
446 | | - }, |
| 435 | + "actions": [], |
| 436 | + "events": [ |
447 | 437 | { |
448 | | - "type": { |
449 | | - "value": "RectangleMovement::RectangleMovement::SetBottom" |
450 | | - }, |
451 | | - "parameters": [ |
452 | | - "MovingObject", |
453 | | - "RectangleMovement", |
454 | | - "CenterObject.BoundingBoxBottom()", |
455 | | - "" |
456 | | - ] |
| 438 | + "colorB": 228, |
| 439 | + "colorG": 176, |
| 440 | + "colorR": 74, |
| 441 | + "creationTime": 0, |
| 442 | + "name": "Inside (default)", |
| 443 | + "source": "", |
| 444 | + "type": "BuiltinCommonInstructions::Group", |
| 445 | + "events": [ |
| 446 | + { |
| 447 | + "type": "BuiltinCommonInstructions::Standard", |
| 448 | + "conditions": [ |
| 449 | + { |
| 450 | + "type": { |
| 451 | + "value": "BuiltinCommonInstructions::Or" |
| 452 | + }, |
| 453 | + "parameters": [], |
| 454 | + "subInstructions": [ |
| 455 | + { |
| 456 | + "type": { |
| 457 | + "value": "CompareArgumentAsString" |
| 458 | + }, |
| 459 | + "parameters": [ |
| 460 | + "\"PositionOnBorder\"", |
| 461 | + "=", |
| 462 | + "\"Inside\"" |
| 463 | + ] |
| 464 | + }, |
| 465 | + { |
| 466 | + "type": { |
| 467 | + "value": "CompareArgumentAsString" |
| 468 | + }, |
| 469 | + "parameters": [ |
| 470 | + "\"PositionOnBorder\"", |
| 471 | + "=", |
| 472 | + "\"\"" |
| 473 | + ] |
| 474 | + } |
| 475 | + ] |
| 476 | + } |
| 477 | + ], |
| 478 | + "actions": [ |
| 479 | + { |
| 480 | + "type": { |
| 481 | + "value": "RectangleMovement::RectangleMovement::SetTop" |
| 482 | + }, |
| 483 | + "parameters": [ |
| 484 | + "MovingObject", |
| 485 | + "RectangleMovement", |
| 486 | + "CenterObject.BoundingBoxTop()", |
| 487 | + "" |
| 488 | + ] |
| 489 | + }, |
| 490 | + { |
| 491 | + "type": { |
| 492 | + "value": "RectangleMovement::RectangleMovement::SetBottom" |
| 493 | + }, |
| 494 | + "parameters": [ |
| 495 | + "MovingObject", |
| 496 | + "RectangleMovement", |
| 497 | + "CenterObject.BoundingBoxBottom() - MovingObject.Height()", |
| 498 | + "" |
| 499 | + ] |
| 500 | + }, |
| 501 | + { |
| 502 | + "type": { |
| 503 | + "value": "RectangleMovement::RectangleMovement::SetLeft" |
| 504 | + }, |
| 505 | + "parameters": [ |
| 506 | + "MovingObject", |
| 507 | + "RectangleMovement", |
| 508 | + "CenterObject.BoundingBoxLeft()", |
| 509 | + "" |
| 510 | + ] |
| 511 | + }, |
| 512 | + { |
| 513 | + "type": { |
| 514 | + "value": "RectangleMovement::RectangleMovement::SetRight" |
| 515 | + }, |
| 516 | + "parameters": [ |
| 517 | + "MovingObject", |
| 518 | + "RectangleMovement", |
| 519 | + "CenterObject.BoundingBoxRight() - MovingObject.Width()", |
| 520 | + "" |
| 521 | + ] |
| 522 | + } |
| 523 | + ] |
| 524 | + } |
| 525 | + ], |
| 526 | + "parameters": [] |
457 | 527 | }, |
458 | 528 | { |
459 | | - "type": { |
460 | | - "value": "RectangleMovement::RectangleMovement::SetLeft" |
461 | | - }, |
462 | | - "parameters": [ |
463 | | - "MovingObject", |
464 | | - "RectangleMovement", |
465 | | - "CenterObject.BoundingBoxLeft()", |
466 | | - "" |
467 | | - ] |
| 529 | + "colorB": 228, |
| 530 | + "colorG": 176, |
| 531 | + "colorR": 74, |
| 532 | + "creationTime": 0, |
| 533 | + "name": "Center", |
| 534 | + "source": "", |
| 535 | + "type": "BuiltinCommonInstructions::Group", |
| 536 | + "events": [ |
| 537 | + { |
| 538 | + "type": "BuiltinCommonInstructions::Standard", |
| 539 | + "conditions": [ |
| 540 | + { |
| 541 | + "type": { |
| 542 | + "value": "CompareArgumentAsString" |
| 543 | + }, |
| 544 | + "parameters": [ |
| 545 | + "\"PositionOnBorder\"", |
| 546 | + "=", |
| 547 | + "\"Center\"" |
| 548 | + ] |
| 549 | + } |
| 550 | + ], |
| 551 | + "actions": [ |
| 552 | + { |
| 553 | + "type": { |
| 554 | + "value": "RectangleMovement::RectangleMovement::SetTop" |
| 555 | + }, |
| 556 | + "parameters": [ |
| 557 | + "MovingObject", |
| 558 | + "RectangleMovement", |
| 559 | + "CenterObject.BoundingBoxTop() - MovingObject.Height()/2", |
| 560 | + "" |
| 561 | + ] |
| 562 | + }, |
| 563 | + { |
| 564 | + "type": { |
| 565 | + "value": "RectangleMovement::RectangleMovement::SetBottom" |
| 566 | + }, |
| 567 | + "parameters": [ |
| 568 | + "MovingObject", |
| 569 | + "RectangleMovement", |
| 570 | + "CenterObject.BoundingBoxBottom() - MovingObject.Height()/2", |
| 571 | + "" |
| 572 | + ] |
| 573 | + }, |
| 574 | + { |
| 575 | + "type": { |
| 576 | + "value": "RectangleMovement::RectangleMovement::SetLeft" |
| 577 | + }, |
| 578 | + "parameters": [ |
| 579 | + "MovingObject", |
| 580 | + "RectangleMovement", |
| 581 | + "CenterObject.BoundingBoxLeft() - MovingObject.Width()/2", |
| 582 | + "" |
| 583 | + ] |
| 584 | + }, |
| 585 | + { |
| 586 | + "type": { |
| 587 | + "value": "RectangleMovement::RectangleMovement::SetRight" |
| 588 | + }, |
| 589 | + "parameters": [ |
| 590 | + "MovingObject", |
| 591 | + "RectangleMovement", |
| 592 | + "CenterObject.BoundingBoxRight() - MovingObject.Width()/2", |
| 593 | + "" |
| 594 | + ] |
| 595 | + } |
| 596 | + ] |
| 597 | + } |
| 598 | + ], |
| 599 | + "parameters": [] |
468 | 600 | }, |
469 | 601 | { |
470 | | - "type": { |
471 | | - "value": "RectangleMovement::RectangleMovement::SetRight" |
472 | | - }, |
473 | | - "parameters": [ |
474 | | - "MovingObject", |
475 | | - "RectangleMovement", |
476 | | - "CenterObject.BoundingBoxRight()", |
477 | | - "" |
478 | | - ] |
| 602 | + "colorB": 228, |
| 603 | + "colorG": 176, |
| 604 | + "colorR": 74, |
| 605 | + "creationTime": 0, |
| 606 | + "name": "Outside", |
| 607 | + "source": "", |
| 608 | + "type": "BuiltinCommonInstructions::Group", |
| 609 | + "events": [ |
| 610 | + { |
| 611 | + "type": "BuiltinCommonInstructions::Standard", |
| 612 | + "conditions": [ |
| 613 | + { |
| 614 | + "type": { |
| 615 | + "value": "CompareArgumentAsString" |
| 616 | + }, |
| 617 | + "parameters": [ |
| 618 | + "\"PositionOnBorder\"", |
| 619 | + "=", |
| 620 | + "\"Outside\"" |
| 621 | + ] |
| 622 | + } |
| 623 | + ], |
| 624 | + "actions": [ |
| 625 | + { |
| 626 | + "type": { |
| 627 | + "value": "RectangleMovement::RectangleMovement::SetTop" |
| 628 | + }, |
| 629 | + "parameters": [ |
| 630 | + "MovingObject", |
| 631 | + "RectangleMovement", |
| 632 | + "CenterObject.BoundingBoxTop() - MovingObject.Height()", |
| 633 | + "" |
| 634 | + ] |
| 635 | + }, |
| 636 | + { |
| 637 | + "type": { |
| 638 | + "value": "RectangleMovement::RectangleMovement::SetBottom" |
| 639 | + }, |
| 640 | + "parameters": [ |
| 641 | + "MovingObject", |
| 642 | + "RectangleMovement", |
| 643 | + "CenterObject.BoundingBoxBottom()", |
| 644 | + "" |
| 645 | + ] |
| 646 | + }, |
| 647 | + { |
| 648 | + "type": { |
| 649 | + "value": "RectangleMovement::RectangleMovement::SetLeft" |
| 650 | + }, |
| 651 | + "parameters": [ |
| 652 | + "MovingObject", |
| 653 | + "RectangleMovement", |
| 654 | + "CenterObject.BoundingBoxLeft() - MovingObject.Width()", |
| 655 | + "" |
| 656 | + ] |
| 657 | + }, |
| 658 | + { |
| 659 | + "type": { |
| 660 | + "value": "RectangleMovement::RectangleMovement::SetRight" |
| 661 | + }, |
| 662 | + "parameters": [ |
| 663 | + "MovingObject", |
| 664 | + "RectangleMovement", |
| 665 | + "CenterObject.BoundingBoxRight()", |
| 666 | + "" |
| 667 | + ] |
| 668 | + } |
| 669 | + ] |
| 670 | + } |
| 671 | + ], |
| 672 | + "parameters": [] |
479 | 673 | } |
480 | 674 | ] |
481 | 675 | } |
|
501 | 695 | "description": "Center object", |
502 | 696 | "name": "CenterObject", |
503 | 697 | "type": "objectList" |
| 698 | + }, |
| 699 | + { |
| 700 | + "description": "Position on border", |
| 701 | + "name": "PositionOnBorder", |
| 702 | + "supplementaryInformation": "[\"Inside\",\"Center\",\"Outside\"]", |
| 703 | + "type": "stringWithSelector" |
504 | 704 | } |
505 | 705 | ], |
506 | 706 | "objectGroups": [] |
|
0 commit comments