fuzzyworld

godot-shooter / change-html-template / files / Player.tscn

Branch change-html-template · default branch · all branches

Player.tscn

3.4 KB · history · blame

1[gd_scene load_steps=6 format=2]
2
3[ext_resource path="res://assets/kenney_simple-space/PNG/Default/ship_sidesA.png" type="Texture" id=1]
4[ext_resource path="res://Explosion.tscn" type="PackedScene" 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[ext_resource path="res://CharacterTheme.tres" type="Theme" id=5]
8
9[node name="Player" type="KinematicBody2D"]
10rotation = -0.000165944
11script = ExtResource( 3 )
12bullet = ExtResource( 4 )
13
14[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."]
15polygon = PoolVector2Array( -0.996349, -22.0002, -8.00133, 7.99867, -7.00166, 9.99884, -11.002, 11.9982, -14.0007, 3.99768, -20.002, 11.9967, -17.0038, 22.9972, -9.00465, 27.9985, -8.00448, 26.9987, -10.0027, 15.9983, -6.00232, 13.999, -0.00398266, 24, 4.99784, 13.0008, 9.99734, 16.0017, 6.99552, 27.0012, 7.99519, 29.0013, 10.9952, 29.0018, 17.996, 24.003, 20.998, 12.0035, 15.9993, 4.00266, 12.9993, 4.00216, 10.9982, 11.0018, 6.99834, 10.0012, 0.00381671, -23 )
16
17[node name="Graphics" type="Node2D" parent="."]
18
19[node name="Alive" type="Sprite" parent="Graphics"]
20modulate = Color( 0, 1, 0, 1 )
21texture = ExtResource( 1 )
22
23[node name="Control" type="Node2D" parent="Graphics/Alive"]
24
25[node name="HealthLabel" type="Label" parent="Graphics/Alive/Control"]
26margin_left = -48.0051
27margin_top = 30.992
28margin_right = 48.9949
29margin_bottom = 65.992
30theme = ExtResource( 5 )
31text = "HEALTH"
32align = 1
33uppercase = true
34
35[node name="Dead" type="Node2D" parent="Graphics"]
36visible = false
37
38[node name="Explosion" parent="Graphics/Dead" instance=ExtResource( 2 )]
39
40[node name="CanvasLayer" type="CanvasLayer" parent="."]
41layer = 100
42
43[node name="CenterContainer" type="CenterContainer" parent="CanvasLayer"]
44margin_left = 109.0
45margin_top = 84.0
46margin_right = 109.0
47margin_bottom = 84.0
48mouse_filter = 2
49
50[node name="DeathScreen" type="Control" parent="CanvasLayer/CenterContainer"]
51pause_mode = 2
52visible = false
53mouse_filter = 2
54size_flags_horizontal = 5
55size_flags_vertical = 5
56
57[node name="ColorRect" type="ColorRect" parent="CanvasLayer/CenterContainer/DeathScreen"]
58margin_right = 40.0
59margin_bottom = 40.0
60color = Color( 0, 0, 0, 1 )
61
62[node name="Panel" type="Panel" parent="CanvasLayer/CenterContainer/DeathScreen"]
63margin_right = 250.0
64margin_bottom = 150.0
65mouse_filter = 2
66
67[node name="Label" type="Label" parent="CanvasLayer/CenterContainer/DeathScreen/Panel"]
68anchor_right = 1.0
69margin_top = 50.0
70margin_bottom = 14.0
71theme = ExtResource( 5 )
72text = "Game Over"
73align = 1
74valign = 1
75
76[node name="Button" type="Button" parent="CanvasLayer/CenterContainer/DeathScreen/Panel"]
77anchor_top = 1.0
78anchor_right = 1.0
79anchor_bottom = 1.0
80margin_top = -20.0
81theme = ExtResource( 5 )
82text = "Restart"
83
84[node name="Camera2D" type="Camera2D" parent="."]
85current = true
86
87[node name="CanvasLayer2" type="CanvasLayer" parent="."]
88visible = false
89
90[node name="Background" type="ColorRect" parent="CanvasLayer2"]
91anchor_right = 1.0
92anchor_bottom = 1.0
93margin_top = -2.0
94margin_bottom = -2.0
95color = Color( 0.811765, 0, 0, 1 )
96
97[node name="ShotTimer" type="Timer" parent="."]
98wait_time = 0.5
99autostart = true
100
101[node name="Barrel" type="Position2D" parent="."]
102position = Vector2( 0, -20 )
103rotation = -3.14044
104__meta__ = {
105"_gizmo_extents_": 14.2
106}
107
108[connection signal="pressed" from="CanvasLayer/CenterContainer/DeathScreen/Panel/Button" to="." method="_on_Button_pressed"]
109[connection signal="timeout" from="ShotTimer" to="." method="allow_fire"]