godot-shooter / change-html-template / files / Player.tscn
Branch change-html-template · 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 | |
12be4538 2023-11-06 Pavel Safronov | 3 | [ext_resource path="res://assets/kenney_simple-space/PNG/Default/ship_sidesA.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="."] | |
12be4538 2023-11-06 Pavel Safronov | 15 | polygon = 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 ) |
b856550a 2023-10-30 Pavel Safronov | 16 | |
| 17 | [node name="Graphics" type="Node2D" parent="."] | |
| 18 | ||
| 19 | [node name="Alive" type="Sprite" parent="Graphics"] | |
eb5388a0 2023-11-06 Pavel Safronov | 20 | modulate = Color( 0, 1, 0, 1 ) |
b856550a 2023-10-30 Pavel Safronov | 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"] | |
eb5388a0 2023-11-06 Pavel Safronov | 26 | margin_left = -48.0051 |
| 27 | margin_top = 30.992 | |
| 28 | margin_right = 48.9949 | |
| 29 | margin_bottom = 65.992 | |
50483a82 2023-11-02 Pavel Safronov | 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"] |
a670e302 2023-11-07 Pavel Safronov | 51 | pause_mode = 2 |
f398dcb9 2023-11-02 Pavel Safronov | 52 | visible = false |
| 53 | mouse_filter = 2 | |
| 54 | size_flags_horizontal = 5 | |
| 55 | size_flags_vertical = 5 | |
| 56 | ||
| 57 | [node name="ColorRect" type="ColorRect" parent="CanvasLayer/CenterContainer/DeathScreen"] | |
b856550a 2023-10-30 Pavel Safronov | 58 | margin_right = 40.0 |
| 59 | margin_bottom = 40.0 | |
| 60 | color = Color( 0, 0, 0, 1 ) | |
| 61 | ||
f398dcb9 2023-11-02 Pavel Safronov | 62 | [node name="Panel" type="Panel" parent="CanvasLayer/CenterContainer/DeathScreen"] |
ad6f22a5 2023-11-02 Pavel Safronov | 63 | margin_right = 250.0 |
| 64 | margin_bottom = 150.0 | |
f398dcb9 2023-11-02 Pavel Safronov | 65 | mouse_filter = 2 |
b856550a 2023-10-30 Pavel Safronov | 66 | |
f398dcb9 2023-11-02 Pavel Safronov | 67 | [node name="Label" type="Label" parent="CanvasLayer/CenterContainer/DeathScreen/Panel"] |
| 68 | anchor_right = 1.0 | |
| 69 | margin_top = 50.0 | |
b856550a 2023-10-30 Pavel Safronov | 70 | margin_bottom = 14.0 |
ad6f22a5 2023-11-02 Pavel Safronov | 71 | theme = ExtResource( 5 ) |
b856550a 2023-10-30 Pavel Safronov | 72 | text = "Game Over" |
f398dcb9 2023-11-02 Pavel Safronov | 73 | align = 1 |
| 74 | valign = 1 | |
b856550a 2023-10-30 Pavel Safronov | 75 | |
f398dcb9 2023-11-02 Pavel Safronov | 76 | [node name="Button" type="Button" parent="CanvasLayer/CenterContainer/DeathScreen/Panel"] |
| 77 | anchor_top = 1.0 | |
| 78 | anchor_right = 1.0 | |
| 79 | anchor_bottom = 1.0 | |
| 80 | margin_top = -20.0 | |
ad6f22a5 2023-11-02 Pavel Safronov | 81 | theme = ExtResource( 5 ) |
b856550a 2023-10-30 Pavel Safronov | 82 | text = "Restart" |
| 83 | ||
| 84 | [node name="Camera2D" type="Camera2D" parent="."] | |
| 85 | current = true | |
| 86 | ||
| 87 | [node name="CanvasLayer2" type="CanvasLayer" parent="."] | |
2ef72487 2023-11-01 Pavel Safronov | 88 | visible = false |
b856550a 2023-10-30 Pavel Safronov | 89 | |
| 90 | [node name="Background" type="ColorRect" parent="CanvasLayer2"] | |
| 91 | anchor_right = 1.0 | |
| 92 | anchor_bottom = 1.0 | |
2ef72487 2023-11-01 Pavel Safronov | 93 | margin_top = -2.0 |
| 94 | margin_bottom = -2.0 | |
| 95 | color = Color( 0.811765, 0, 0, 1 ) | |
b856550a 2023-10-30 Pavel Safronov | 96 | |
| 97 | [node name="ShotTimer" type="Timer" parent="."] | |
a261d90c 2023-11-02 Pavel Safronov | 98 | wait_time = 0.5 |
574ba8cd 2023-11-02 Pavel Safronov | 99 | autostart = true |
b856550a 2023-10-30 Pavel Safronov | 100 | |
| 101 | [node name="Barrel" type="Position2D" parent="."] | |
| 102 | position = Vector2( 0, -20 ) | |
| 103 | rotation = -3.14044 | |
| 104 | __meta__ = { | |
| 105 | "_gizmo_extents_": 14.2 | |
| 106 | } | |
| 107 | ||
f398dcb9 2023-11-02 Pavel Safronov | 108 | [connection signal="pressed" from="CanvasLayer/CenterContainer/DeathScreen/Panel/Button" to="." method="_on_Button_pressed"] |
b856550a 2023-10-30 Pavel Safronov | 109 | [connection signal="timeout" from="ShotTimer" to="." method="allow_fire"] |