-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathship.tscn
More file actions
121 lines (106 loc) · 3.4 KB
/
ship.tscn
File metadata and controls
121 lines (106 loc) · 3.4 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
[gd_scene load_steps=11 format=3 uid="uid://d3albi0hmpvhh"]
[ext_resource type="Script" path="res://ship.gd" id="1_47qgr"]
[ext_resource type="PackedScene" uid="uid://ds2hx6vg6rxim" path="res://bullet.tscn" id="2_lw0yf"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_0ss4g"]
radius = 15.0
height = 32.0
[sub_resource type="CompressedTexture2D" id="CompressedTexture2D_8l006"]
load_path = "res://.godot/imported/red-spaceship.png-090ecab8fc82a31c26d2b677edaba9c3.ctex"
[sub_resource type="Animation" id="Animation_q385d"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [0]
}
[sub_resource type="Animation" id="Animation_h007p"]
resource_name = "move_left"
length = 0.4
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [1, 2, 3]
}
[sub_resource type="Animation" id="Animation_f8v0q"]
resource_name = "move_left_reversed"
length = 0.4
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 1,
"values": [2, 1, 0, 0]
}
[sub_resource type="Animation" id="Animation_8t7ay"]
resource_name = "move_right"
length = 0.3
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2),
"transitions": PackedFloat32Array(1, 1, 1),
"update": 1,
"values": [6, 7, 8]
}
[sub_resource type="Animation" id="Animation_sl55m"]
resource_name = "move_right_reversed"
length = 0.4
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath("Sprite2D:frame")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.1, 0.2, 0.3),
"transitions": PackedFloat32Array(1, 1, 1, 1),
"update": 1,
"values": [8, 7, 6, 5]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_dd08h"]
_data = {
"RESET": SubResource("Animation_q385d"),
"move_left": SubResource("Animation_h007p"),
"move_left_reversed": SubResource("Animation_f8v0q"),
"move_right": SubResource("Animation_8t7ay"),
"move_right_reversed": SubResource("Animation_sl55m")
}
[node name="Ship" type="Area2D"]
collision_mask = 2
script = ExtResource("1_47qgr")
bullet_scene = ExtResource("2_lw0yf")
[node name="CollisionShapeShip" type="CollisionShape2D" parent="."]
shape = SubResource("CapsuleShape2D_0ss4g")
[node name="BulletCooldown" type="Timer" parent="."]
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = SubResource("CompressedTexture2D_8l006")
hframes = 9
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_dd08h")
}
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
[connection signal="timeout" from="BulletCooldown" to="." method="_on_bullet_cooldown_timeout"]