godot-shooter / godot-4-testing / files / Player.tscn
Branch godot-4-testing · default branch · all branches
Player.tscn
b856550a 2023-10-30 Pavel Safronov | 1 | [gd_scene load_steps=5 format=2] |
| 2 | ||
11a2e1d9 2023-10-31 Pavel Safronov | 3 | [ext_resource path="res://kenney_simple-space/PNG/Default/ship_C.png" type="Texture2D" id=1] |
| 4 | [ext_resource path="res://kenney_simple-space/PNG/Default/star_large.png" type="Texture2D" id=2] | |
b856550a 2023-10-30 Pavel Safronov | 5 | [ext_resource path="res://Player.gd" type="Script" id=3] |
| 6 | [ext_resource path="res://Bullet.tscn" type="PackedScene" id=4] | |
| 7 | ||
11a2e1d9 2023-10-31 Pavel Safronov | 8 | [node name="Player" type="CharacterBody2D"] |
b856550a 2023-10-30 Pavel Safronov | 9 | rotation = -0.000165944 |
| 10 | script = ExtResource( 3 ) | |
| 11 | bullet = ExtResource( 4 ) | |
| 12 | ||
| 13 | [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] | |
| 14 | visible = false | |
11a2e1d9 2023-10-31 Pavel Safronov | 15 | polygon = PackedVector2Array( -24, 17, 0, 8, 24, 17, 24, 0, 0, -16, -24, 0 ) |
b856550a 2023-10-30 Pavel Safronov | 16 | |
| 17 | [node name="Graphics" type="Node2D" parent="."] | |
| 18 | ||
11a2e1d9 2023-10-31 Pavel Safronov | 19 | [node name="Alive" type="Sprite2D" parent="Graphics"] |
b856550a 2023-10-30 Pavel Safronov | 20 | texture = ExtResource( 1 ) |
| 21 | ||
11a2e1d9 2023-10-31 Pavel Safronov | 22 | [node name="Dead" type="Sprite2D" parent="Graphics"] |
b856550a 2023-10-30 Pavel Safronov | 23 | visible = false |
| 24 | texture = ExtResource( 2 ) | |
| 25 | ||
| 26 | [node name="CanvasLayer" type="CanvasLayer" parent="."] | |
| 27 | ||
| 28 | [node name="DeathScreen" type="Control" parent="CanvasLayer"] | |
| 29 | visible = false | |
11a2e1d9 2023-10-31 Pavel Safronov | 30 | offset_right = 40.0 |
| 31 | offset_bottom = 40.0 | |
b856550a 2023-10-30 Pavel Safronov | 32 | |
| 33 | [node name="ColorRect" type="ColorRect" parent="CanvasLayer/DeathScreen"] | |
11a2e1d9 2023-10-31 Pavel Safronov | 34 | offset_right = 40.0 |
| 35 | offset_bottom = 40.0 | |
b856550a 2023-10-30 Pavel Safronov | 36 | color = Color( 0, 0, 0, 1 ) |
| 37 | ||
| 38 | [node name="Panel" type="Panel" parent="CanvasLayer/DeathScreen"] | |
11a2e1d9 2023-10-31 Pavel Safronov | 39 | offset_right = 40.0 |
| 40 | offset_bottom = 40.0 | |
b856550a 2023-10-30 Pavel Safronov | 41 | |
| 42 | [node name="Label" type="Label" parent="CanvasLayer/DeathScreen/Panel"] | |
11a2e1d9 2023-10-31 Pavel Safronov | 43 | offset_right = 73.0 |
| 44 | offset_bottom = 14.0 | |
b856550a 2023-10-30 Pavel Safronov | 45 | text = "Game Over" |
| 46 | ||
| 47 | [node name="Button" type="Button" parent="CanvasLayer/DeathScreen/Panel"] | |
11a2e1d9 2023-10-31 Pavel Safronov | 48 | offset_left = 14.0 |
| 49 | offset_top = 19.0 | |
| 50 | offset_right = 26.0 | |
| 51 | offset_bottom = 39.0 | |
b856550a 2023-10-30 Pavel Safronov | 52 | text = "Restart" |
| 53 | ||
| 54 | [node name="Camera2D" type="Camera2D" parent="."] | |
| 55 | current = true | |
| 56 | ||
| 57 | [node name="CanvasLayer2" type="CanvasLayer" parent="."] | |
| 58 | ||
| 59 | [node name="Background" type="ColorRect" parent="CanvasLayer2"] | |
| 60 | visible = false | |
| 61 | anchor_right = 1.0 | |
| 62 | anchor_bottom = 1.0 | |
11a2e1d9 2023-10-31 Pavel Safronov | 63 | offset_left = -509.0 |
| 64 | offset_top = -298.0 | |
| 65 | offset_right = -509.0 | |
| 66 | offset_bottom = -298.0 | |
b856550a 2023-10-30 Pavel Safronov | 67 | color = Color( 0, 0, 0, 1 ) |
| 68 | ||
| 69 | [node name="ShotTimer" type="Timer" parent="."] | |
| 70 | ||
11a2e1d9 2023-10-31 Pavel Safronov | 71 | [node name="Barrel" type="Marker2D" parent="."] |
b856550a 2023-10-30 Pavel Safronov | 72 | position = Vector2( 0, -20 ) |
| 73 | rotation = -3.14044 | |
| 74 | __meta__ = { | |
| 75 | "_gizmo_extents_": 14.2 | |
| 76 | } | |
| 77 | ||
| 78 | [connection signal="timeout" from="ShotTimer" to="." method="allow_fire"] |