|
1 | | -[gd_scene load_steps=43 format=4 uid="uid://bj20g2u4cy81b"] |
| 1 | +[gd_scene load_steps=29 format=4 uid="uid://bj20g2u4cy81b"] |
2 | 2 |
|
3 | 3 | [ext_resource type="Script" path="res://addons/block_code/block_code_node/block_code.gd" id="3_dqwyj"] |
4 | 4 | [ext_resource type="Script" path="res://addons/block_code/serialization/block_serialization.gd" id="4_ccg5p"] |
5 | | -[ext_resource type="Script" path="res://addons/block_code/serialization/block_serialized_properties.gd" id="5_tfpym"] |
6 | | -[ext_resource type="Script" path="res://addons/block_code/ui/block_canvas/option_data.gd" id="6_faaoa"] |
| 5 | +[ext_resource type="Script" path="res://addons/block_code/serialization/block_serialization_tree.gd" id="5_xx1qu"] |
7 | 6 | [ext_resource type="Script" path="res://addons/block_code/serialization/block_script_serialization.gd" id="7_1dauq"] |
8 | | -[ext_resource type="Script" path="res://addons/block_code/ui/block_canvas/variable_resource.gd" id="8_hboe4"] |
| 7 | +[ext_resource type="Script" path="res://addons/block_code/code_generation/variable_definition.gd" id="7_rnv25"] |
| 8 | +[ext_resource type="Script" path="res://addons/block_code/serialization/value_block_serialization.gd" id="9_irwe2"] |
9 | 9 | [ext_resource type="Texture2D" uid="uid://bmkupx658eth0" path="res://game-02/floor-tile.png" id="9_pcnvp"] |
10 | 10 | [ext_resource type="Texture2D" uid="uid://dxfr76nbmbvad" path="res://game-02/tiles.png" id="10_5fo76"] |
11 | 11 | [ext_resource type="PackedScene" uid="uid://duf85mtqcx2sw" path="res://game-02/player.tscn" id="10_8lga1"] |
@@ -483,222 +483,133 @@ terrain_set_0/terrain_0/name = "Terrain 0" |
483 | 483 | terrain_set_0/terrain_0/color = Color(0.941248, 0.150602, 0.25095, 1) |
484 | 484 | sources/1 = SubResource("TileSetAtlasSource_ut0gn") |
485 | 485 |
|
486 | | -[sub_resource type="Resource" id="Resource_nl70e"] |
487 | | -script = ExtResource("5_tfpym") |
488 | | -block_class = &"EntryBlock" |
489 | | -serialized_props = [["scope", ""], ["param_input_strings", {}]] |
490 | | - |
491 | | -[sub_resource type="Resource" id="Resource_7afc6"] |
492 | | -script = ExtResource("6_faaoa") |
493 | | -selected = 0 |
494 | | -items = ["top-down", "platformer", "spaceship"] |
495 | | - |
496 | | -[sub_resource type="Resource" id="Resource_48imo"] |
497 | | -script = ExtResource("6_faaoa") |
498 | | -selected = 0 |
499 | | -items = ["player_1", "player_2"] |
500 | | - |
501 | | -[sub_resource type="Resource" id="Resource_mq3pa"] |
502 | | -script = ExtResource("5_tfpym") |
503 | | -block_class = &"StatementBlock" |
504 | | -serialized_props = [["scope", ""], ["param_input_strings", { |
505 | | -"kind": SubResource("Resource_7afc6"), |
506 | | -"player": SubResource("Resource_48imo") |
507 | | -}]] |
508 | | - |
509 | | -[sub_resource type="Resource" id="Resource_p1g27"] |
| 486 | +[sub_resource type="Resource" id="Resource_e3ure"] |
510 | 487 | script = ExtResource("4_ccg5p") |
511 | 488 | name = &"simplecharacter_move" |
512 | | -position = Vector2(0, 0) |
513 | | -path_child_pairs = [] |
514 | | -block_serialized_properties = SubResource("Resource_mq3pa") |
| 489 | +children = Array[ExtResource("4_ccg5p")]([]) |
| 490 | +arguments = { |
| 491 | +"kind": "top-down", |
| 492 | +"player": "player_1" |
| 493 | +} |
515 | 494 |
|
516 | | -[sub_resource type="Resource" id="Resource_l1lpv"] |
| 495 | +[sub_resource type="Resource" id="Resource_7wgjm"] |
517 | 496 | script = ExtResource("4_ccg5p") |
518 | 497 | name = &"process" |
519 | | -position = Vector2(75, 75) |
520 | | -path_child_pairs = [[NodePath("VBoxContainer/SnapPoint"), SubResource("Resource_p1g27")]] |
521 | | -block_serialized_properties = SubResource("Resource_nl70e") |
| 498 | +children = Array[ExtResource("4_ccg5p")]([SubResource("Resource_e3ure")]) |
| 499 | +arguments = {} |
| 500 | + |
| 501 | +[sub_resource type="Resource" id="Resource_g2ije"] |
| 502 | +script = ExtResource("5_xx1qu") |
| 503 | +root = SubResource("Resource_7wgjm") |
| 504 | +canvas_position = Vector2(150, 125) |
522 | 505 |
|
523 | 506 | [sub_resource type="Resource" id="Resource_2wck8"] |
524 | 507 | script = ExtResource("7_1dauq") |
525 | 508 | script_inherits = "SimpleCharacter" |
526 | | -block_trees = Array[ExtResource("4_ccg5p")]([SubResource("Resource_l1lpv")]) |
527 | | -variables = Array[ExtResource("8_hboe4")]([]) |
| 509 | +block_serialization_trees = Array[ExtResource("5_xx1qu")]([SubResource("Resource_g2ije")]) |
| 510 | +variables = Array[ExtResource("7_rnv25")]([]) |
528 | 511 | generated_script = "extends SimpleCharacter |
529 | 512 |
|
530 | 513 |
|
531 | 514 | func _process(delta): |
532 | | - move_with_player_buttons(\"player_1\", \"top-down\", delta) |
| 515 | + move_with_player_buttons('player_1', 'top-down', delta) |
533 | 516 |
|
534 | 517 | " |
535 | 518 | version = 0 |
536 | 519 |
|
537 | 520 | [sub_resource type="RectangleShape2D" id="RectangleShape2D_cm312"] |
538 | 521 | size = Vector2(126, 130) |
539 | 522 |
|
540 | | -[sub_resource type="Resource" id="Resource_ar10s"] |
541 | | -script = ExtResource("5_tfpym") |
542 | | -block_class = &"EntryBlock" |
543 | | -serialized_props = [["scope", ""], ["param_input_strings", {}]] |
544 | | - |
545 | | -[sub_resource type="Resource" id="Resource_xpg0k"] |
546 | | -script = ExtResource("5_tfpym") |
547 | | -block_class = &"ParameterBlock" |
548 | | -serialized_props = [["block_name", &"parameter_block"], ["label", "Param"], ["color", Color(0.294118, 0.482353, 0.92549, 1)], ["block_type", 3], ["position", Vector2(0, 0)], ["scope", "func _on_body_entered(body: Node2D): |
549 | | -"], ["block_format", "body"], ["statement", "body"], ["defaults", {}], ["variant_type", 24], ["param_input_strings", {}]] |
| 523 | +[sub_resource type="Resource" id="Resource_2jflh"] |
| 524 | +script = ExtResource("9_irwe2") |
| 525 | +name = &"area2d_on_entered:something" |
| 526 | +arguments = {} |
550 | 527 |
|
551 | | -[sub_resource type="Resource" id="Resource_thcg4"] |
552 | | -script = ExtResource("4_ccg5p") |
553 | | -name = &"parameter_block" |
554 | | -position = Vector2(0, 0) |
555 | | -path_child_pairs = [] |
556 | | -block_serialized_properties = SubResource("Resource_xpg0k") |
557 | | - |
558 | | -[sub_resource type="Resource" id="Resource_gy7rh"] |
559 | | -script = ExtResource("5_tfpym") |
560 | | -block_class = &"ControlBlock" |
561 | | -serialized_props = [["scope", ""], ["param_input_strings_array", [{ |
562 | | -"condition": false |
563 | | -}]]] |
564 | | - |
565 | | -[sub_resource type="Resource" id="Resource_fd185"] |
566 | | -script = ExtResource("5_tfpym") |
567 | | -block_class = &"ParameterBlock" |
568 | | -serialized_props = [["scope", ""], ["param_input_strings", { |
| 528 | +[sub_resource type="Resource" id="Resource_05q8c"] |
| 529 | +script = ExtResource("9_irwe2") |
| 530 | +name = &"is_node_in_group" |
| 531 | +arguments = { |
569 | 532 | "group": "player2", |
570 | | -"node": "" |
571 | | -}]] |
572 | | - |
573 | | -[sub_resource type="Resource" id="Resource_ky7nh"] |
574 | | -script = ExtResource("5_tfpym") |
575 | | -block_class = &"ParameterBlock" |
576 | | -serialized_props = [["block_name", &"parameter_block"], ["label", "Param"], ["color", Color(0.294118, 0.482353, 0.92549, 1)], ["block_type", 3], ["position", Vector2(0, 0)], ["scope", "func _on_body_entered(body: Node2D): |
577 | | -"], ["block_format", "body"], ["statement", "body"], ["defaults", {}], ["variant_type", 24], ["param_input_strings", {}]] |
| 533 | +"node": SubResource("Resource_2jflh") |
| 534 | +} |
578 | 535 |
|
579 | | -[sub_resource type="Resource" id="Resource_ovpg7"] |
| 536 | +[sub_resource type="Resource" id="Resource_fm37r"] |
580 | 537 | script = ExtResource("4_ccg5p") |
581 | | -name = &"parameter_block" |
582 | | -position = Vector2(0, 0) |
583 | | -path_child_pairs = [] |
584 | | -block_serialized_properties = SubResource("Resource_ky7nh") |
585 | | - |
586 | | -[sub_resource type="Resource" id="Resource_nbu3r"] |
587 | | -script = ExtResource("4_ccg5p") |
588 | | -name = &"is_node_in_group" |
589 | | -position = Vector2(0, 0) |
590 | | -path_child_pairs = [[NodePath("MarginContainer/HBoxContainer/ParameterInput0/SnapPoint"), SubResource("Resource_ovpg7")]] |
591 | | -block_serialized_properties = SubResource("Resource_fd185") |
592 | | - |
593 | | -[sub_resource type="Resource" id="Resource_fotpr"] |
594 | | -script = ExtResource("5_tfpym") |
595 | | -block_class = &"StatementBlock" |
596 | | -serialized_props = [["scope", ""], ["param_input_strings", { |
597 | | -"text": "FOUND!" |
598 | | -}]] |
599 | | - |
600 | | -[sub_resource type="Resource" id="Resource_4030w"] |
601 | | -script = ExtResource("5_tfpym") |
602 | | -block_class = &"StatementBlock" |
603 | | -serialized_props = [["scope", ""], ["param_input_strings", { |
| 538 | +name = &"call_method_group" |
| 539 | +children = Array[ExtResource("4_ccg5p")]([]) |
| 540 | +arguments = { |
604 | 541 | "group": "animations", |
605 | 542 | "method_name": "the_end" |
606 | | -}]] |
| 543 | +} |
607 | 544 |
|
608 | | -[sub_resource type="Resource" id="Resource_twsaq"] |
609 | | -script = ExtResource("4_ccg5p") |
610 | | -name = &"call_method_group" |
611 | | -position = Vector2(0, 0) |
612 | | -path_child_pairs = [] |
613 | | -block_serialized_properties = SubResource("Resource_4030w") |
614 | | - |
615 | | -[sub_resource type="Resource" id="Resource_gefe6"] |
616 | | -script = ExtResource("4_ccg5p") |
617 | | -name = &"print" |
618 | | -position = Vector2(20, 0) |
619 | | -path_child_pairs = [[NodePath("VBoxContainer/SnapPoint"), SubResource("Resource_twsaq")]] |
620 | | -block_serialized_properties = SubResource("Resource_fotpr") |
621 | | - |
622 | | -[sub_resource type="Resource" id="Resource_n2xrg"] |
| 545 | +[sub_resource type="Resource" id="Resource_m7jnv"] |
623 | 546 | script = ExtResource("4_ccg5p") |
624 | 547 | name = &"if" |
625 | | -position = Vector2(0, 0) |
626 | | -path_child_pairs = [[NodePath("VBoxContainer/MarginContainer/Rows/Row0/RowHBoxContainer/RowHBox/ParameterInput0/SnapPoint"), SubResource("Resource_nbu3r")], [NodePath("VBoxContainer/MarginContainer/Rows/SnapContainer0/SnapPoint"), SubResource("Resource_gefe6")]] |
627 | | -block_serialized_properties = SubResource("Resource_gy7rh") |
| 548 | +children = Array[ExtResource("4_ccg5p")]([SubResource("Resource_fm37r")]) |
| 549 | +arguments = { |
| 550 | +"condition": SubResource("Resource_05q8c") |
| 551 | +} |
628 | 552 |
|
629 | | -[sub_resource type="Resource" id="Resource_xe3h8"] |
| 553 | +[sub_resource type="Resource" id="Resource_okwbo"] |
630 | 554 | script = ExtResource("4_ccg5p") |
631 | 555 | name = &"area2d_on_entered" |
632 | | -position = Vector2(175, 175) |
633 | | -path_child_pairs = [[NodePath("VBoxContainer/TopMarginContainer/MarginContainer/HBoxContainer/ParameterOutput0/SnapPoint"), SubResource("Resource_thcg4")], [NodePath("VBoxContainer/SnapPoint"), SubResource("Resource_n2xrg")]] |
634 | | -block_serialized_properties = SubResource("Resource_ar10s") |
| 556 | +children = Array[ExtResource("4_ccg5p")]([SubResource("Resource_m7jnv")]) |
| 557 | +arguments = {} |
| 558 | + |
| 559 | +[sub_resource type="Resource" id="Resource_r4von"] |
| 560 | +script = ExtResource("5_xx1qu") |
| 561 | +root = SubResource("Resource_okwbo") |
| 562 | +canvas_position = Vector2(225, 50) |
635 | 563 |
|
636 | 564 | [sub_resource type="Resource" id="Resource_mkew0"] |
637 | 565 | script = ExtResource("7_1dauq") |
638 | 566 | script_inherits = "Area2D" |
639 | | -block_trees = Array[ExtResource("4_ccg5p")]([SubResource("Resource_xe3h8")]) |
640 | | -variables = Array[ExtResource("8_hboe4")]([]) |
| 567 | +block_serialization_trees = Array[ExtResource("5_xx1qu")]([SubResource("Resource_r4von")]) |
| 568 | +variables = Array[ExtResource("7_rnv25")]([]) |
641 | 569 | generated_script = "extends Area2D |
642 | 570 |
|
643 | 571 |
|
644 | | -func _on_body_entered(body: Node2D): |
| 572 | +func _init(): |
| 573 | + body_entered.connect(_on_body_entered) |
| 574 | +
|
| 575 | +func _on_body_entered(something: Node2D): |
645 | 576 |
|
646 | | - if body.is_in_group('player2'): |
647 | | - print('FOUND!') |
| 577 | + if ((something).is_in_group('player2')): |
648 | 578 | get_tree().call_group('animations', 'the_end') |
649 | 579 |
|
650 | | -func _init(): |
651 | | - body_entered.connect(_on_body_entered) |
652 | 580 | " |
653 | 581 | version = 0 |
654 | 582 |
|
655 | | -[sub_resource type="Resource" id="Resource_e2dbj"] |
656 | | -script = ExtResource("5_tfpym") |
657 | | -block_class = &"EntryBlock" |
658 | | -serialized_props = [["scope", ""], ["param_input_strings", {}]] |
659 | | - |
660 | | -[sub_resource type="Resource" id="Resource_8i6h3"] |
661 | | -script = ExtResource("6_faaoa") |
662 | | -selected = 0 |
663 | | -items = ["top-down", "platformer", "spaceship"] |
664 | | - |
665 | | -[sub_resource type="Resource" id="Resource_5lnsh"] |
666 | | -script = ExtResource("6_faaoa") |
667 | | -selected = 1 |
668 | | -items = ["player_1", "player_2"] |
669 | | - |
670 | | -[sub_resource type="Resource" id="Resource_b7pye"] |
671 | | -script = ExtResource("5_tfpym") |
672 | | -block_class = &"StatementBlock" |
673 | | -serialized_props = [["scope", ""], ["param_input_strings", { |
674 | | -"kind": SubResource("Resource_8i6h3"), |
675 | | -"player": SubResource("Resource_5lnsh") |
676 | | -}]] |
677 | | - |
678 | | -[sub_resource type="Resource" id="Resource_tsw33"] |
| 583 | +[sub_resource type="Resource" id="Resource_sfea4"] |
679 | 584 | script = ExtResource("4_ccg5p") |
680 | 585 | name = &"simplecharacter_move" |
681 | | -position = Vector2(0, 0) |
682 | | -path_child_pairs = [] |
683 | | -block_serialized_properties = SubResource("Resource_b7pye") |
| 586 | +children = Array[ExtResource("4_ccg5p")]([]) |
| 587 | +arguments = { |
| 588 | +"kind": "top-down", |
| 589 | +"player": "player_2" |
| 590 | +} |
684 | 591 |
|
685 | | -[sub_resource type="Resource" id="Resource_py4j5"] |
| 592 | +[sub_resource type="Resource" id="Resource_odib3"] |
686 | 593 | script = ExtResource("4_ccg5p") |
687 | 594 | name = &"process" |
688 | | -position = Vector2(50, 75) |
689 | | -path_child_pairs = [[NodePath("VBoxContainer/SnapPoint"), SubResource("Resource_tsw33")]] |
690 | | -block_serialized_properties = SubResource("Resource_e2dbj") |
| 595 | +children = Array[ExtResource("4_ccg5p")]([SubResource("Resource_sfea4")]) |
| 596 | +arguments = {} |
| 597 | + |
| 598 | +[sub_resource type="Resource" id="Resource_cxy5a"] |
| 599 | +script = ExtResource("5_xx1qu") |
| 600 | +root = SubResource("Resource_odib3") |
| 601 | +canvas_position = Vector2(375, 100) |
691 | 602 |
|
692 | 603 | [sub_resource type="Resource" id="Resource_2m4p2"] |
693 | 604 | script = ExtResource("7_1dauq") |
694 | 605 | script_inherits = "SimpleCharacter" |
695 | | -block_trees = Array[ExtResource("4_ccg5p")]([SubResource("Resource_py4j5")]) |
696 | | -variables = Array[ExtResource("8_hboe4")]([]) |
| 606 | +block_serialization_trees = Array[ExtResource("5_xx1qu")]([SubResource("Resource_cxy5a")]) |
| 607 | +variables = Array[ExtResource("7_rnv25")]([]) |
697 | 608 | generated_script = "extends SimpleCharacter |
698 | 609 |
|
699 | 610 |
|
700 | 611 | func _process(delta): |
701 | | - move_with_player_buttons(\"player_2\", \"top-down\", delta) |
| 612 | + move_with_player_buttons('player_2', 'top-down', delta) |
702 | 613 |
|
703 | 614 | " |
704 | 615 | version = 0 |
|
0 commit comments