godot-shooter / meteor / files / Player.tscn
Branch meteor · default branch · all branches
Player.tscn
| 1 | [gd_scene load_steps=6 format=2] |
| 2 | |
| 3 | [ext_resource path="res://assets/kenney_simple-space/PNG/Default/ship_C.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"] |
| 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 | |
| 23 | [node name="Control" type="Node2D" parent="Graphics/Alive"] |
| 24 | |
| 25 | [node name="HealthLabel" type="Label" parent="Graphics/Alive/Control"] |
| 26 | margin_left = -25.0046 |
| 27 | margin_top = 27.9959 |
| 28 | margin_right = 40.9954 |
| 29 | margin_bottom = 51.9958 |
| 30 | theme = ExtResource( 5 ) |
| 31 | text = "HEALTH" |
| 32 | align = 1 |
| 33 | uppercase = true |
| 34 | |
| 35 | [node name="Dead" type="Node2D" parent="Graphics"] |
| 36 | visible = false |
| 37 | |
| 38 | [node name="Explosion" parent="Graphics/Dead" instance=ExtResource( 2 )] |
| 39 | |
| 40 | [node name="CanvasLayer" type="CanvasLayer" parent="."] |
| 41 | layer = 100 |
| 42 | |
| 43 | [node name="CenterContainer" type="CenterContainer" parent="CanvasLayer"] |
| 44 | margin_left = 109.0 |
| 45 | margin_top = 84.0 |
| 46 | margin_right = 109.0 |
| 47 | margin_bottom = 84.0 |
| 48 | mouse_filter = 2 |
| 49 | |
| 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"] |
| 57 | margin_right = 40.0 |
| 58 | margin_bottom = 40.0 |
| 59 | color = Color( 0, 0, 0, 1 ) |
| 60 | |
| 61 | [node name="Panel" type="Panel" parent="CanvasLayer/CenterContainer/DeathScreen"] |
| 62 | margin_right = 250.0 |
| 63 | margin_bottom = 150.0 |
| 64 | mouse_filter = 2 |
| 65 | |
| 66 | [node name="Label" type="Label" parent="CanvasLayer/CenterContainer/DeathScreen/Panel"] |
| 67 | anchor_right = 1.0 |
| 68 | margin_top = 50.0 |
| 69 | margin_bottom = 14.0 |
| 70 | theme = ExtResource( 5 ) |
| 71 | text = "Game Over" |
| 72 | align = 1 |
| 73 | valign = 1 |
| 74 | |
| 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 |
| 80 | theme = ExtResource( 5 ) |
| 81 | text = "Restart" |
| 82 | |
| 83 | [node name="Camera2D" type="Camera2D" parent="."] |
| 84 | current = true |
| 85 | |
| 86 | [node name="CanvasLayer2" type="CanvasLayer" parent="."] |
| 87 | visible = false |
| 88 | |
| 89 | [node name="Background" type="ColorRect" parent="CanvasLayer2"] |
| 90 | anchor_right = 1.0 |
| 91 | anchor_bottom = 1.0 |
| 92 | margin_top = -2.0 |
| 93 | margin_bottom = -2.0 |
| 94 | color = Color( 0.811765, 0, 0, 1 ) |
| 95 | |
| 96 | [node name="ShotTimer" type="Timer" parent="."] |
| 97 | wait_time = 0.5 |
| 98 | autostart = true |
| 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 | |
| 107 | [connection signal="pressed" from="CanvasLayer/CenterContainer/DeathScreen/Panel/Button" to="." method="_on_Button_pressed"] |
| 108 | [connection signal="timeout" from="ShotTimer" to="." method="allow_fire"] |