summaryrefslogtreecommitdiff
path: root/Objects/Flag.tscn
blob: ab8e3eb9d0240d702281920d7f45bc7a41bf756b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
[gd_scene load_steps=9 format=3 uid="uid://cssvf3k8yn751"]

[ext_resource type="Texture2D" uid="uid://cc2ffqakc6s7m" path="res://Assets/Environment/OA animated flag.png" id="1"]
[ext_resource type="Script" path="res://Objects/Flag.gd" id="2"]

[sub_resource type="AtlasTexture" id="1"]
atlas = ExtResource("1")
region = Rect2(0, 0, 38, 138)

[sub_resource type="AtlasTexture" id="2"]
atlas = ExtResource("1")
region = Rect2(38, 0, 38, 138)

[sub_resource type="AtlasTexture" id="3"]
atlas = ExtResource("1")
region = Rect2(76, 0, 38, 138)

[sub_resource type="AtlasTexture" id="4"]
atlas = ExtResource("1")
region = Rect2(114, 0, 38, 138)

[sub_resource type="SpriteFrames" id="5"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("1")
}, {
"duration": 1.0,
"texture": SubResource("2")
}, {
"duration": 1.0,
"texture": SubResource("3")
}, {
"duration": 1.0,
"texture": SubResource("4")
}],
"loop": true,
"name": &"default",
"speed": 5.0
}]

[sub_resource type="RectangleShape2D" id="6"]
size = Vector2(12, 62)

[node name="Flag" type="Area2D"]
collision_layer = 0
script = ExtResource("2")

[node name="Sprite2D" type="AnimatedSprite2D" parent="."]
scale = Vector2(0.25, 0.25)
sprite_frames = SubResource("5")
frame = 3

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, -0.5)
scale = Vector2(0.5, 0.5)
shape = SubResource("6")

[connection signal="body_entered" from="." to="." method="_on_Flag_body_entered"]