godot-shooter / meteor / files / Player.tscn
Branch meteor · default branch · all branches
Player.tscn
50483a82 2023-11-02 Pavel Safronov | 1 | [gd_scene load_steps=6 format=2] |
b856550a 2023-10-30 Pavel Safronov | 2 | |
5b18ed86 2023-11-01 Pavel Safronov | 3 | [ext_resource path="res://assets/kenney_simple-space/PNG/Default/ship_C.png" type="Texture" id=1] |
f398dcb9 2023-11-02 Pavel Safronov | 4 | [ext_resource path="res://Explosion.tscn" type="PackedScene" 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] | |
50483a82 2023-11-02 Pavel Safronov | 7 | [ext_resource path="res://CharacterTheme.tres" type="Theme" id=5] |
b856550a 2023-10-30 Pavel Safronov | 8 | |
| 9 | [node name="Player" type="KinematicBody2D"] | |
| 10 | rotation = -0.000165944 | |
| 11 | script = ExtResource( 3 ) | |
| 12 | bullet = ExtResource( 4 ) | |
| 13 | ||
| 14 | [node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="."] | |
| 15 | visible = false | |
| 16 | polygon = PoolVector2Array( -24, 17, 0, 8, 24, 17, 24, 0, 0, -16, -24, 0 ) | |
| 17 | ||
| 18 | [node name="Graphics" type="Node2D" parent="."] | |
| 19 | ||
| 20 | [node name="Alive" type="Sprite" parent="Graphics"] | |
| 21 | texture = ExtResource( 1 ) | |
| 22 | ||
c7a34446 2023-10-31 Pavel Safronov | 23 | [node name="Control" type="Node2D" parent="Graphics/Alive"] |
| 24 | ||
| 25 | [node name="HealthLabel" type="Label" parent="Graphics/Alive/Control"] | |
5b18ed86 2023-11-01 Pavel Safronov | 26 | margin_left = -25.0046 |
50483a82 2023-11-02 Pavel Safronov | 27 | margin_top = 27.9959 |
| 28 | margin_right = 40.9954 | |
| 29 | margin_bottom = 51.9958 | |
| 30 | theme = ExtResource( 5 ) | |
c7a34446 2023-10-31 Pavel Safronov | 31 | text = "HEALTH" |
| 32 | align = 1 | |
| 33 | uppercase = true | |
| 34 | ||
f398dcb9 2023-11-02 Pavel Safronov | 35 | [node name="Dead" type="Node2D" parent="Graphics"] |
b856550a 2023-10-30 Pavel Safronov | 36 | visible = false |
f398dcb9 2023-11-02 Pavel Safronov | 37 | |
| 38 | [node name="Explosion" parent="Graphics/Dead" instance=ExtResource( 2 )] | |
b856550a 2023-10-30 Pavel Safronov | 39 | |
| 40 | [node name="CanvasLayer" type="CanvasLayer" parent="."] | |
f398dcb9 2023-11-02 Pavel Safronov | 41 | layer = 100 |
b856550a 2023-10-30 Pavel Safronov | 42 | |
f398dcb9 2023-11-02 Pavel Safronov | 43 | [node name="CenterContainer" type="CenterContainer" parent="CanvasLayer"] |
1e610e5d 2023-11-02 Pavel Safronov | 44 | margin_left = 109.0 |
| 45 | margin_top = 84.0 | |
| 46 | margin_right = 109.0 | |
| 47 | margin_bottom = 84.0 | |
f398dcb9 2023-11-02 Pavel Safronov | 48 | mouse_filter = 2 |
b856550a 2023-10-30 Pavel Safronov | 49 | |
f398dcb9 2023-11-02 Pavel Safronov | 50 | [node name="DeathScreen" type="Control" parent="CanvasLayer/CenterContainer"] |
| 51 | visible = false | |
| 52 | mouse_filter = 2 | |
| 53 | size_flags_horizontal = 5 | |
| 54 | size_flags_vertical = 5 | |
| 55 | ||
| 56 | [node name="ColorRect" type="ColorRect" parent="CanvasLayer/CenterContainer/DeathScreen"] | |
b856550a 2023-10-30 Pavel Safronov | 57 | margin_right = 40.0 |
| 58 | margin_bottom = 40.0 | |
| 59 | color = Color( 0, 0, 0, 1 ) | |
| 60 | ||
f398dcb9 2023-11-02 Pavel Safronov | 61 | [node name="Panel" type="Panel" parent="CanvasLayer/CenterContainer/DeathScreen"] |
ad6f22a5 2023-11-02 Pavel Safronov | 62 | margin_right = 250.0 |
| 63 | margin_bottom = 150.0 | |
f398dcb9 2023-11-02 Pavel Safronov | 64 | mouse_filter = 2 |
b856550a 2023-10-30 Pavel Safronov | 65 | |
f398dcb9 2023-11-02 Pavel Safronov | 66 | [node name="Label" type="Label" parent="CanvasLayer/CenterContainer/DeathScreen/Panel"] |
| 67 | anchor_right = 1.0 | |
| 68 | margin_top = 50.0 | |
b856550a 2023-10-30 Pavel Safronov | 69 | margin_bottom = 14.0 |
ad6f22a5 2023-11-02 Pavel Safronov | 70 | theme = ExtResource( 5 ) |
b856550a 2023-10-30 Pavel Safronov | 71 | text = "Game Over" |
f398dcb9 2023-11-02 Pavel Safronov | 72 | align = 1 |
| 73 | valign = 1 | |
b856550a 2023-10-30 Pavel Safronov | 74 | |
f398dcb9 2023-11-02 Pavel Safronov | 75 | [node name="Button" type="Button" parent="CanvasLayer/CenterContainer/DeathScreen/Panel"] |
| 76 | anchor_top = 1.0 | |
| 77 | anchor_right = 1.0 | |
| 78 | anchor_bottom = 1.0 | |
| 79 | margin_top = -20.0 | |
ad6f22a5 2023-11-02 Pavel Safronov | 80 | theme = ExtResource( 5 ) |
b856550a 2023-10-30 Pavel Safronov | 81 | text = "Restart" |
| 82 | ||
| 83 | [node name="Camera2D" type="Camera2D" parent="."] | |
| 84 | current = true | |
| 85 | ||
| 86 | [node name="CanvasLayer2" type="CanvasLayer" parent="."] | |
2ef72487 2023-11-01 Pavel Safronov | 87 | visible = false |
b856550a 2023-10-30 Pavel Safronov | 88 | |
| 89 | [node name="Background" type="ColorRect" parent="CanvasLayer2"] | |
| 90 | anchor_right = 1.0 | |
| 91 | anchor_bottom = 1.0 | |
2ef72487 2023-11-01 Pavel Safronov | 92 | margin_top = -2.0 |
| 93 | margin_bottom = -2.0 | |
| 94 | color = Color( 0.811765, 0, 0, 1 ) | |
b856550a 2023-10-30 Pavel Safronov | 95 | |
| 96 | [node name="ShotTimer" type="Timer" parent="."] | |
a261d90c 2023-11-02 Pavel Safronov | 97 | wait_time = 0.5 |
574ba8cd 2023-11-02 Pavel Safronov | 98 | autostart = true |
b856550a 2023-10-30 Pavel Safronov | 99 | |
| 100 | [node name="Barrel" type="Position2D" parent="."] | |
| 101 | position = Vector2( 0, -20 ) | |
| 102 | rotation = -3.14044 | |
| 103 | __meta__ = { | |
| 104 | "_gizmo_extents_": 14.2 | |
| 105 | } | |
| 106 | ||
f398dcb9 2023-11-02 Pavel Safronov | 107 | [connection signal="pressed" from="CanvasLayer/CenterContainer/DeathScreen/Panel/Button" to="." method="_on_Button_pressed"] |
b856550a 2023-10-30 Pavel Safronov | 108 | [connection signal="timeout" from="ShotTimer" to="." method="allow_fire"] |