2022-11-20 17:09:43 -03:00
|
|
|
[gd_scene load_steps=10 format=2]
|
2022-11-09 20:21:26 -03:00
|
|
|
|
|
|
|
[ext_resource path="res://assets/block/block.png" type="Texture" id=1]
|
2022-11-20 17:09:43 -03:00
|
|
|
[ext_resource path="res://scenes/collectables/Bolt.tscn" type="PackedScene" id=2]
|
|
|
|
[ext_resource path="res://scenes/block/Block.cs" type="Script" id=3]
|
2022-11-09 20:21:26 -03:00
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id=1]
|
|
|
|
atlas = ExtResource( 1 )
|
|
|
|
region = Rect2( 16, 0, 16, 16 )
|
|
|
|
|
|
|
|
[sub_resource type="AtlasTexture" id=2]
|
|
|
|
atlas = ExtResource( 1 )
|
|
|
|
region = Rect2( 0, 0, 16, 16 )
|
|
|
|
|
|
|
|
[sub_resource type="SpriteFrames" id=3]
|
|
|
|
animations = [ {
|
|
|
|
"frames": [ SubResource( 1 ) ],
|
|
|
|
"loop": true,
|
|
|
|
"name": "opened",
|
|
|
|
"speed": 5.0
|
|
|
|
}, {
|
|
|
|
"frames": [ SubResource( 2 ) ],
|
|
|
|
"loop": true,
|
|
|
|
"name": "unopened",
|
|
|
|
"speed": 5.0
|
|
|
|
} ]
|
|
|
|
|
|
|
|
[sub_resource type="RectangleShape2D" id=4]
|
|
|
|
extents = Vector2( 8, 8 )
|
|
|
|
|
2022-11-20 17:09:43 -03:00
|
|
|
[sub_resource type="Animation" id=5]
|
|
|
|
resource_name = "hit"
|
|
|
|
length = 0.2
|
|
|
|
tracks/0/type = "value"
|
|
|
|
tracks/0/path = NodePath("AnimatedSprite:position")
|
|
|
|
tracks/0/interp = 1
|
|
|
|
tracks/0/loop_wrap = true
|
|
|
|
tracks/0/imported = false
|
|
|
|
tracks/0/enabled = true
|
|
|
|
tracks/0/keys = {
|
|
|
|
"times": PoolRealArray( 0, 0.1, 0.2 ),
|
|
|
|
"transitions": PoolRealArray( 1, 1, 1 ),
|
|
|
|
"update": 0,
|
|
|
|
"values": [ Vector2( 0, 0 ), Vector2( 0, -4 ), Vector2( 0, 0 ) ]
|
|
|
|
}
|
|
|
|
|
|
|
|
[sub_resource type="Animation" id=6]
|
|
|
|
resource_name = "bounce"
|
|
|
|
length = 0.4
|
|
|
|
tracks/0/type = "value"
|
|
|
|
tracks/0/path = NodePath(".:position")
|
|
|
|
tracks/0/interp = 1
|
|
|
|
tracks/0/loop_wrap = true
|
|
|
|
tracks/0/imported = false
|
|
|
|
tracks/0/enabled = true
|
|
|
|
tracks/0/keys = {
|
|
|
|
"times": PoolRealArray( 0, 0.2, 0.4 ),
|
|
|
|
"transitions": PoolRealArray( 1, 1, 1 ),
|
|
|
|
"update": 0,
|
2022-11-21 02:14:28 -03:00
|
|
|
"values": [ Vector2( 0, 0 ), Vector2( 0, -32 ), Vector2( 0, 0 ) ]
|
2022-11-20 17:09:43 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
[node name="MysteryBlock" type="StaticBody2D" groups=["Block"]]
|
2022-11-20 23:50:43 -03:00
|
|
|
z_index = 1
|
2022-11-20 17:09:43 -03:00
|
|
|
script = ExtResource( 3 )
|
2022-11-09 20:21:26 -03:00
|
|
|
|
|
|
|
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
|
|
|
frames = SubResource( 3 )
|
|
|
|
animation = "unopened"
|
2022-11-19 23:21:24 -03:00
|
|
|
centered = false
|
2022-11-09 20:21:26 -03:00
|
|
|
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
|
|
|
visible = false
|
2022-11-19 23:21:24 -03:00
|
|
|
position = Vector2( 8, 8 )
|
2022-11-09 20:21:26 -03:00
|
|
|
shape = SubResource( 4 )
|
2022-11-20 17:09:43 -03:00
|
|
|
|
|
|
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
|
|
|
anims/hit = SubResource( 5 )
|
|
|
|
|
|
|
|
[node name="Bolt" parent="." instance=ExtResource( 2 )]
|
2022-11-20 23:50:43 -03:00
|
|
|
z_as_relative = false
|
2022-11-20 17:09:43 -03:00
|
|
|
collision_layer = 0
|
|
|
|
collision_mask = 0
|
|
|
|
monitoring = false
|
|
|
|
monitorable = false
|
|
|
|
|
|
|
|
[node name="AnimationPlayer" type="AnimationPlayer" parent="Bolt"]
|
|
|
|
anims/bounce = SubResource( 6 )
|
|
|
|
|
|
|
|
[connection signal="animation_finished" from="AnimationPlayer" to="." method="OnAnimationPlayerAnimationFinished"]
|
|
|
|
[connection signal="animation_finished" from="Bolt/AnimationPlayer" to="." method="OnAnimationPlayerAnimationFinished"]
|