godot-shooter / starfield-background / files / Player.tscn
Branch starfield-background · default branch · all branches
Player.tscn
| 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"] |
| 9 | rotation = -0.000165944 |
| 10 | script = ExtResource( 3 ) |
| 11 | bullet = ExtResource( 4 ) |
| 12 | |
| 13 | [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] |
| 14 | visible = false |
| 15 | polygon = 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"] |
| 20 | texture = ExtResource( 1 ) |
| 21 | |
| 22 | [node name="Control" type="Node2D" parent="Graphics/Alive"] |
| 23 | |
| 24 | [node name="HealthLabel" type="Label" parent="Graphics/Alive/Control"] |
| 25 | margin_left = -25.0036 |
| 26 | margin_top = 21.9958 |
| 27 | margin_right = 24.9964 |
| 28 | margin_bottom = 35.9958 |
| 29 | text = "HEALTH" |
| 30 | align = 1 |
| 31 | uppercase = true |
| 32 | |
| 33 | [node name="Dead" type="Sprite" parent="Graphics"] |
| 34 | visible = false |
| 35 | texture = ExtResource( 2 ) |
| 36 | |
| 37 | [node name="CanvasLayer" type="CanvasLayer" parent="."] |
| 38 | |
| 39 | [node name="DeathScreen" type="Control" parent="CanvasLayer"] |
| 40 | visible = false |
| 41 | margin_right = 40.0 |
| 42 | margin_bottom = 40.0 |
| 43 | |
| 44 | [node name="ColorRect" type="ColorRect" parent="CanvasLayer/DeathScreen"] |
| 45 | margin_right = 40.0 |
| 46 | margin_bottom = 40.0 |
| 47 | color = Color( 0, 0, 0, 1 ) |
| 48 | |
| 49 | [node name="Panel" type="Panel" parent="CanvasLayer/DeathScreen"] |
| 50 | margin_right = 40.0 |
| 51 | margin_bottom = 40.0 |
| 52 | |
| 53 | [node name="Label" type="Label" parent="CanvasLayer/DeathScreen/Panel"] |
| 54 | margin_right = 73.0 |
| 55 | margin_bottom = 14.0 |
| 56 | text = "Game Over" |
| 57 | |
| 58 | [node name="Button" type="Button" parent="CanvasLayer/DeathScreen/Panel"] |
| 59 | margin_left = 14.0 |
| 60 | margin_top = 19.0 |
| 61 | margin_right = 26.0 |
| 62 | margin_bottom = 39.0 |
| 63 | text = "Restart" |
| 64 | |
| 65 | [node name="Camera2D" type="Camera2D" parent="."] |
| 66 | current = true |
| 67 | |
| 68 | [node name="CanvasLayer2" type="CanvasLayer" parent="."] |
| 69 | |
| 70 | [node name="Background" type="ColorRect" parent="CanvasLayer2"] |
| 71 | visible = false |
| 72 | anchor_right = 1.0 |
| 73 | anchor_bottom = 1.0 |
| 74 | margin_left = -509.0 |
| 75 | margin_top = -298.0 |
| 76 | margin_right = -509.0 |
| 77 | margin_bottom = -298.0 |
| 78 | color = Color( 0, 0, 0, 1 ) |
| 79 | |
| 80 | [node name="ShotTimer" type="Timer" parent="."] |
| 81 | |
| 82 | [node name="Barrel" type="Position2D" parent="."] |
| 83 | position = Vector2( 0, -20 ) |
| 84 | rotation = -3.14044 |
| 85 | __meta__ = { |
| 86 | "_gizmo_extents_": 14.2 |
| 87 | } |
| 88 | |
| 89 | [connection signal="timeout" from="ShotTimer" to="." method="allow_fire"] |