fuzzyworld

godot-shooter / starfield-background / files / Player.tscn

Branch starfield-background · default branch · all branches

Player.tscn

2.4 KB · history · blame

1[gd_scene load_steps=5 format=2]
2
3[ext_resource path="res://kenney_simple-space/PNG/Default/ship_C.png" type="Texture" id=1]
4[ext_resource path="res://kenney_simple-space/PNG/Default/star_large.png" type="Texture" id=2]
5[ext_resource path="res://Player.gd" type="Script" id=3]
6[ext_resource path="res://Bullet.tscn" type="PackedScene" id=4]
7
8[node name="Player" type="KinematicBody2D"]
9rotation = -0.000165944
10script = ExtResource( 3 )
11bullet = ExtResource( 4 )
12
13[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
14visible = false
15polygon = PoolVector2Array( -24, 17, 0, 8, 24, 17, 24, 0, 0, -16, -24, 0 )
16
17[node name="Graphics" type="Node2D" parent="."]
18
19[node name="Alive" type="Sprite" parent="Graphics"]
20texture = ExtResource( 1 )
21
22[node name="Control" type="Node2D" parent="Graphics/Alive"]
23
24[node name="HealthLabel" type="Label" parent="Graphics/Alive/Control"]
25margin_left = -25.0036
26margin_top = 21.9958
27margin_right = 24.9964
28margin_bottom = 35.9958
29text = "HEALTH"
30align = 1
31uppercase = true
32
33[node name="Dead" type="Sprite" parent="Graphics"]
34visible = false
35texture = ExtResource( 2 )
36
37[node name="CanvasLayer" type="CanvasLayer" parent="."]
38
39[node name="DeathScreen" type="Control" parent="CanvasLayer"]
40visible = false
41margin_right = 40.0
42margin_bottom = 40.0
43
44[node name="ColorRect" type="ColorRect" parent="CanvasLayer/DeathScreen"]
45margin_right = 40.0
46margin_bottom = 40.0
47color = Color( 0, 0, 0, 1 )
48
49[node name="Panel" type="Panel" parent="CanvasLayer/DeathScreen"]
50margin_right = 40.0
51margin_bottom = 40.0
52
53[node name="Label" type="Label" parent="CanvasLayer/DeathScreen/Panel"]
54margin_right = 73.0
55margin_bottom = 14.0
56text = "Game Over"
57
58[node name="Button" type="Button" parent="CanvasLayer/DeathScreen/Panel"]
59margin_left = 14.0
60margin_top = 19.0
61margin_right = 26.0
62margin_bottom = 39.0
63text = "Restart"
64
65[node name="Camera2D" type="Camera2D" parent="."]
66current = true
67
68[node name="CanvasLayer2" type="CanvasLayer" parent="."]
69
70[node name="Background" type="ColorRect" parent="CanvasLayer2"]
71visible = false
72anchor_right = 1.0
73anchor_bottom = 1.0
74margin_left = -509.0
75margin_top = -298.0
76margin_right = -509.0
77margin_bottom = -298.0
78color = Color( 0, 0, 0, 1 )
79
80[node name="ShotTimer" type="Timer" parent="."]
81
82[node name="Barrel" type="Position2D" parent="."]
83position = Vector2( 0, -20 )
84rotation = -3.14044
85__meta__ = {
86"_gizmo_extents_": 14.2
87}
88
89[connection signal="timeout" from="ShotTimer" to="." method="allow_fire"]