|
| 1 | +[gd_scene load_steps=18 format=3 uid="uid://b7gyfmfo5wtm1"] |
| 2 | + |
| 3 | +[ext_resource type="TileSet" uid="uid://bmkax0b814rmy" path="res://game-03/spaces/tileset-a.tres" id="1_fn3w6"] |
| 4 | +[ext_resource type="Script" path="res://addons/block_code/block_code_node/block_code.gd" id="2_xy6in"] |
| 5 | +[ext_resource type="Script" path="res://addons/block_code/serialization/block_serialization.gd" id="3_r18qn"] |
| 6 | +[ext_resource type="Script" path="res://addons/block_code/serialization/block_serialized_properties.gd" id="4_6iq68"] |
| 7 | +[ext_resource type="Script" path="res://addons/block_code/serialization/block_script_serialization.gd" id="5_a0j4o"] |
| 8 | +[ext_resource type="Script" path="res://addons/block_code/ui/block_canvas/option_data.gd" id="5_koayc"] |
| 9 | +[ext_resource type="Script" path="res://addons/block_code/ui/block_canvas/variable_resource.gd" id="6_773h0"] |
| 10 | + |
| 11 | +[sub_resource type="RectangleShape2D" id="RectangleShape2D_5opsn"] |
| 12 | +size = Vector2(256, 112) |
| 13 | + |
| 14 | +[sub_resource type="Animation" id="Animation_vuag3"] |
| 15 | +length = 0.001 |
| 16 | +tracks/0/type = "value" |
| 17 | +tracks/0/imported = false |
| 18 | +tracks/0/enabled = true |
| 19 | +tracks/0/path = NodePath("RigidBody2D:position") |
| 20 | +tracks/0/interp = 1 |
| 21 | +tracks/0/loop_wrap = true |
| 22 | +tracks/0/keys = { |
| 23 | +"times": PackedFloat32Array(0), |
| 24 | +"transitions": PackedFloat32Array(1), |
| 25 | +"update": 0, |
| 26 | +"values": [Vector2(0, 0)] |
| 27 | +} |
| 28 | + |
| 29 | +[sub_resource type="Animation" id="Animation_o6p3a"] |
| 30 | +resource_name = "shake" |
| 31 | +length = 2.0 |
| 32 | +tracks/0/type = "value" |
| 33 | +tracks/0/imported = false |
| 34 | +tracks/0/enabled = true |
| 35 | +tracks/0/path = NodePath("RigidBody2D:position") |
| 36 | +tracks/0/interp = 1 |
| 37 | +tracks/0/loop_wrap = true |
| 38 | +tracks/0/keys = { |
| 39 | +"times": PackedFloat32Array(0, 0.2, 0.3, 0.5, 0.6, 0.8, 0.9, 1, 2), |
| 40 | +"transitions": PackedFloat32Array(1, 1, 1, 1, 1, 1, 1, 1, 1), |
| 41 | +"update": 0, |
| 42 | +"values": [Vector2(0, 0), Vector2(-8, 8), Vector2(-8, 0), Vector2(8, 0), Vector2(8, 8), Vector2(-8, 0), Vector2(8, 0), Vector2(0, 0), Vector2(0, 2000)] |
| 43 | +} |
| 44 | + |
| 45 | +[sub_resource type="AnimationLibrary" id="AnimationLibrary_gae7a"] |
| 46 | +_data = { |
| 47 | +"RESET": SubResource("Animation_vuag3"), |
| 48 | +"shake": SubResource("Animation_o6p3a") |
| 49 | +} |
| 50 | + |
| 51 | +[sub_resource type="Resource" id="Resource_ajvdh"] |
| 52 | +script = ExtResource("4_6iq68") |
| 53 | +block_class = &"EntryBlock" |
| 54 | +serialized_props = [["scope", ""], ["param_input_strings", { |
| 55 | +"method_name": "play_shake" |
| 56 | +}]] |
| 57 | + |
| 58 | +[sub_resource type="Resource" id="Resource_betlu"] |
| 59 | +script = ExtResource("5_koayc") |
| 60 | +selected = 0 |
| 61 | +items = ["ahead", "backwards"] |
| 62 | + |
| 63 | +[sub_resource type="Resource" id="Resource_ou5dh"] |
| 64 | +script = ExtResource("4_6iq68") |
| 65 | +block_class = &"StatementBlock" |
| 66 | +serialized_props = [["scope", ""], ["param_input_strings", { |
| 67 | +"animation": "shake", |
| 68 | +"direction": SubResource("Resource_betlu") |
| 69 | +}]] |
| 70 | + |
| 71 | +[sub_resource type="Resource" id="Resource_ym3c5"] |
| 72 | +script = ExtResource("3_r18qn") |
| 73 | +name = &"animationplayer_play" |
| 74 | +position = Vector2(0, 0) |
| 75 | +path_child_pairs = [] |
| 76 | +block_serialized_properties = SubResource("Resource_ou5dh") |
| 77 | + |
| 78 | +[sub_resource type="Resource" id="Resource_m2it8"] |
| 79 | +script = ExtResource("3_r18qn") |
| 80 | +name = &"define_method" |
| 81 | +position = Vector2(125, 100) |
| 82 | +path_child_pairs = [[NodePath("VBoxContainer/SnapPoint"), SubResource("Resource_ym3c5")]] |
| 83 | +block_serialized_properties = SubResource("Resource_ajvdh") |
| 84 | + |
| 85 | +[sub_resource type="Resource" id="Resource_ay1sf"] |
| 86 | +script = ExtResource("5_a0j4o") |
| 87 | +script_inherits = "AnimationPlayer" |
| 88 | +block_trees = Array[ExtResource("3_r18qn")]([SubResource("Resource_m2it8")]) |
| 89 | +variables = Array[ExtResource("6_773h0")]([]) |
| 90 | +generated_script = "extends AnimationPlayer |
| 91 | +
|
| 92 | +
|
| 93 | +func play_shake(): |
| 94 | + if \"ahead\" == \"ahead\": |
| 95 | + play('shake') |
| 96 | + else: |
| 97 | + play_backwards('shake') |
| 98 | +
|
| 99 | +" |
| 100 | +version = 0 |
| 101 | + |
| 102 | +[node name="float_platform" type="Node2D" groups=["float_platform"]] |
| 103 | + |
| 104 | +[node name="RigidBody2D" type="RigidBody2D" parent="."] |
| 105 | +freeze = true |
| 106 | +freeze_mode = 1 |
| 107 | + |
| 108 | +[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"] |
| 109 | +position = Vector2(0, 56) |
| 110 | +shape = SubResource("RectangleShape2D_5opsn") |
| 111 | + |
| 112 | +[node name="TileMapLayer" type="TileMapLayer" parent="RigidBody2D"] |
| 113 | +tile_map_data = PackedByteArray(0, 0, 255, 255, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0) |
| 114 | +tile_set = ExtResource("1_fn3w6") |
| 115 | + |
| 116 | +[node name="AnimationPlayer" type="AnimationPlayer" parent="RigidBody2D"] |
| 117 | +root_node = NodePath("../..") |
| 118 | +libraries = { |
| 119 | +"": SubResource("AnimationLibrary_gae7a") |
| 120 | +} |
| 121 | +autoplay = "RESET" |
| 122 | + |
| 123 | +[node name="BlockCode" type="Node" parent="RigidBody2D/AnimationPlayer"] |
| 124 | +script = ExtResource("2_xy6in") |
| 125 | +block_script = SubResource("Resource_ay1sf") |
0 commit comments