godot-shooter / files / actors / Player.tscn
Player.tscn
| 1 | [gd_scene load_steps=19 format=2] |
| 2 | |
| 3 | [ext_resource path="res://assets/kenney_simple-space/PNG/Default/ship_sidesA.png" type="Texture" id=1] |
| 4 | [ext_resource path="res://effects/Explosion.tscn" type="PackedScene" id=2] |
| 5 | [ext_resource path="res://actors/Player.gd" type="Script" id=3] |
| 6 | [ext_resource path="res://assets/kenney_simple-space/PNG/Retina/ship_B.png" type="Texture" id=4] |
| 7 | [ext_resource path="res://themes/CharacterTheme.tres" type="Theme" id=5] |
| 8 | [ext_resource path="res://effects/Trails.tscn" type="PackedScene" id=6] |
| 9 | [ext_resource path="res://scenes/Scores.tscn" type="PackedScene" id=7] |
| 10 | [ext_resource path="res://assets/neuropolitical rg.otf" type="DynamicFontData" id=8] |
| 11 | [ext_resource path="res://themes/Theme.tres" type="Theme" id=9] |
| 12 | [ext_resource path="res://scenes/HUD.tscn" type="PackedScene" id=10] |
| 13 | |
| 14 | [sub_resource type="Gradient" id=2] |
| 15 | colors = PoolColorArray( 1, 0, 0, 1, 1, 0, 0, 0 ) |
| 16 | |
| 17 | [sub_resource type="StyleBoxFlat" id=13] |
| 18 | bg_color = Color( 1, 1, 1, 1 ) |
| 19 | |
| 20 | [sub_resource type="StyleBoxFlat" id=14] |
| 21 | bg_color = Color( 0.211765, 0.211765, 0.211765, 1 ) |
| 22 | |
| 23 | [sub_resource type="Gradient" id=1] |
| 24 | colors = PoolColorArray( 0, 0, 0, 0, 0, 1, 0, 1 ) |
| 25 | |
| 26 | [sub_resource type="DynamicFont" id=9] |
| 27 | size = 24 |
| 28 | font_data = ExtResource( 8 ) |
| 29 | |
| 30 | [sub_resource type="DynamicFont" id=10] |
| 31 | outline_color = Color( 0, 0.490196, 0.831373, 1 ) |
| 32 | use_mipmaps = true |
| 33 | use_filter = true |
| 34 | font_data = ExtResource( 8 ) |
| 35 | |
| 36 | [sub_resource type="Theme" id=11] |
| 37 | default_font = SubResource( 10 ) |
| 38 | |
| 39 | [sub_resource type="DynamicFont" id=12] |
| 40 | use_mipmaps = true |
| 41 | use_filter = true |
| 42 | font_data = ExtResource( 8 ) |
| 43 | |
| 44 | [node name="Player" type="KinematicBody2D" groups=["player"]] |
| 45 | rotation = -0.000165944 |
| 46 | z_index = 10 |
| 47 | collision_mask = 6 |
| 48 | script = ExtResource( 3 ) |
| 49 | radar_max_radius = 3000 |
| 50 | |
| 51 | [node name="ShipCollisionShape" type="CollisionPolygon2D" parent="."] |
| 52 | 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 ) |
| 53 | |
| 54 | [node name="Graphics" type="Node2D" parent="."] |
| 55 | |
| 56 | [node name="Alive" type="Node2D" parent="Graphics"] |
| 57 | |
| 58 | [node name="LaserBeam" type="Line2D" parent="Graphics/Alive"] |
| 59 | points = PoolVector2Array( 0, 0, 0, -300 ) |
| 60 | width = 2.0 |
| 61 | default_color = Color( 1, 0, 0, 1 ) |
| 62 | gradient = SubResource( 2 ) |
| 63 | antialiased = true |
| 64 | |
| 65 | [node name="Sprite" type="Sprite" parent="Graphics/Alive"] |
| 66 | modulate = Color( 0, 1, 0, 1 ) |
| 67 | texture = ExtResource( 1 ) |
| 68 | |
| 69 | [node name="StaticControls" type="Node2D" parent="Graphics/Alive"] |
| 70 | |
| 71 | [node name="HealthLabel" type="Label" parent="Graphics/Alive/StaticControls"] |
| 72 | visible = false |
| 73 | margin_left = -48.0051 |
| 74 | margin_top = 30.992 |
| 75 | margin_right = 48.9949 |
| 76 | margin_bottom = 65.992 |
| 77 | theme = ExtResource( 5 ) |
| 78 | text = "HEALTH" |
| 79 | align = 1 |
| 80 | uppercase = true |
| 81 | |
| 82 | [node name="RadarSprite" type="Sprite" parent="Graphics/Alive/StaticControls"] |
| 83 | scale = Vector2( 0.4, 0.4 ) |
| 84 | texture = ExtResource( 4 ) |
| 85 | offset = Vector2( 0, -300 ) |
| 86 | |
| 87 | [node name="Radar" type="Node2D" parent="Graphics/Alive/StaticControls"] |
| 88 | |
| 89 | [node name="ProgressBar" type="ProgressBar" parent="Graphics/Alive/StaticControls"] |
| 90 | margin_left = -50.0 |
| 91 | margin_top = 45.0 |
| 92 | margin_right = 50.0 |
| 93 | margin_bottom = 50.0 |
| 94 | rect_min_size = Vector2( 100, 5 ) |
| 95 | custom_styles/fg = SubResource( 13 ) |
| 96 | custom_styles/bg = SubResource( 14 ) |
| 97 | value = 30.0 |
| 98 | percent_visible = false |
| 99 | |
| 100 | [node name="Trails" parent="Graphics/Alive" instance=ExtResource( 6 )] |
| 101 | modulate = Color( 1, 0, 0, 1 ) |
| 102 | gradient = SubResource( 1 ) |
| 103 | |
| 104 | [node name="PlayerToTarget" type="Line2D" parent="Graphics/Alive"] |
| 105 | visible = false |
| 106 | modulate = Color( 1, 0.984314, 0, 1 ) |
| 107 | points = PoolVector2Array( 2085.69, 283.505, 2067.82, 274.471 ) |
| 108 | width = 3.0 |
| 109 | default_color = Color( 1, 0.976471, 0.4, 1 ) |
| 110 | joint_mode = 1 |
| 111 | begin_cap_mode = 2 |
| 112 | end_cap_mode = 2 |
| 113 | round_precision = 13 |
| 114 | antialiased = true |
| 115 | |
| 116 | [node name="Dead" type="Node2D" parent="Graphics"] |
| 117 | visible = false |
| 118 | |
| 119 | [node name="Explosion" parent="Graphics/Dead" instance=ExtResource( 2 )] |
| 120 | |
| 121 | [node name="UI" type="CanvasLayer" parent="."] |
| 122 | pause_mode = 2 |
| 123 | layer = 100 |
| 124 | |
| 125 | [node name="HUD" parent="UI" instance=ExtResource( 10 )] |
| 126 | pause_mode = 2 |
| 127 | |
| 128 | [node name="DeathScreen" type="Control" parent="UI"] |
| 129 | pause_mode = 2 |
| 130 | visible = false |
| 131 | margin_left = 109.0 |
| 132 | margin_top = 84.0 |
| 133 | margin_right = 109.0 |
| 134 | margin_bottom = 84.0 |
| 135 | mouse_filter = 2 |
| 136 | size_flags_horizontal = 5 |
| 137 | size_flags_vertical = 5 |
| 138 | |
| 139 | [node name="CenterContainer" type="CenterContainer" parent="UI/DeathScreen"] |
| 140 | anchor_right = 1.0 |
| 141 | anchor_bottom = 1.0 |
| 142 | |
| 143 | [node name="PanelContainer" type="PanelContainer" parent="UI/DeathScreen/CenterContainer"] |
| 144 | margin_right = 300.0 |
| 145 | margin_bottom = 200.0 |
| 146 | rect_min_size = Vector2( 300, 200 ) |
| 147 | |
| 148 | [node name="VBoxContainer" type="VBoxContainer" parent="UI/DeathScreen/CenterContainer/PanelContainer"] |
| 149 | margin_left = 14.0 |
| 150 | margin_top = 14.0 |
| 151 | margin_right = 286.0 |
| 152 | margin_bottom = 186.0 |
| 153 | |
| 154 | [node name="Label" type="Label" parent="UI/DeathScreen/CenterContainer/PanelContainer/VBoxContainer"] |
| 155 | margin_right = 272.0 |
| 156 | margin_bottom = 25.0 |
| 157 | size_flags_horizontal = 3 |
| 158 | theme = ExtResource( 5 ) |
| 159 | text = "Game Over" |
| 160 | align = 1 |
| 161 | valign = 1 |
| 162 | |
| 163 | [node name="FinalScoreLabel" type="Label" parent="UI/DeathScreen/CenterContainer/PanelContainer/VBoxContainer"] |
| 164 | margin_top = 33.0 |
| 165 | margin_right = 272.0 |
| 166 | margin_bottom = 58.0 |
| 167 | |
| 168 | [node name="StartNewGameButton" type="Button" parent="UI/DeathScreen/CenterContainer/PanelContainer/VBoxContainer"] |
| 169 | margin_top = 135.0 |
| 170 | margin_right = 272.0 |
| 171 | margin_bottom = 172.0 |
| 172 | size_flags_vertical = 14 |
| 173 | theme = ExtResource( 5 ) |
| 174 | text = "Restart" |
| 175 | |
| 176 | [node name="IntroMenu" type="Control" parent="UI" groups=["pause_menu"]] |
| 177 | visible = false |
| 178 | anchor_right = 1.0 |
| 179 | anchor_bottom = 1.0 |
| 180 | |
| 181 | [node name="CenterContainer" type="CenterContainer" parent="UI/IntroMenu"] |
| 182 | anchor_right = 1.0 |
| 183 | anchor_bottom = 1.0 |
| 184 | |
| 185 | [node name="PanelContainer" type="PanelContainer" parent="UI/IntroMenu/CenterContainer"] |
| 186 | margin_left = 236.0 |
| 187 | margin_top = 386.0 |
| 188 | margin_right = 264.0 |
| 189 | margin_bottom = 414.0 |
| 190 | |
| 191 | [node name="VBoxContainer" type="VBoxContainer" parent="UI/IntroMenu/CenterContainer/PanelContainer"] |
| 192 | margin_left = 14.0 |
| 193 | margin_top = 14.0 |
| 194 | margin_right = 447.0 |
| 195 | margin_bottom = 451.0 |
| 196 | theme = ExtResource( 9 ) |
| 197 | alignment = 1 |
| 198 | |
| 199 | [node name="Label" type="Label" parent="UI/IntroMenu/CenterContainer/PanelContainer/VBoxContainer"] |
| 200 | margin_right = 433.0 |
| 201 | margin_bottom = 30.0 |
| 202 | custom_fonts/font = SubResource( 9 ) |
| 203 | text = "Welcome to Tactical Shooter!" |
| 204 | |
| 205 | [node name="RichTextLabel" type="RichTextLabel" parent="UI/IntroMenu/CenterContainer/PanelContainer/VBoxContainer"] |
| 206 | margin_top = 38.0 |
| 207 | margin_right = 433.0 |
| 208 | margin_bottom = 324.0 |
| 209 | theme = SubResource( 11 ) |
| 210 | text = "This is a 2D space shooter game. |
| 211 | |
| 212 | You choose where to fly in this game. |
| 213 | |
| 214 | Your ship will attack for you. |
| 215 | |
| 216 | Touch/click + hold anywhere to pause the game and plan your course. |
| 217 | Let go to set location as the destination. |
| 218 | |
| 219 | Your objective count is in the lower-right corner. |
| 220 | The radar shows enemies and objectives." |
| 221 | fit_content_height = true |
| 222 | |
| 223 | [node name="AlwaysShowIntroCheckBox" type="CheckBox" parent="UI/IntroMenu/CenterContainer/PanelContainer/VBoxContainer"] |
| 224 | margin_top = 332.0 |
| 225 | margin_right = 433.0 |
| 226 | margin_bottom = 380.0 |
| 227 | custom_fonts/font = SubResource( 12 ) |
| 228 | pressed = true |
| 229 | text = "Always show intro" |
| 230 | |
| 231 | [node name="StartButton" type="Button" parent="UI/IntroMenu/CenterContainer/PanelContainer/VBoxContainer"] |
| 232 | margin_top = 388.0 |
| 233 | margin_right = 433.0 |
| 234 | margin_bottom = 437.0 |
| 235 | mouse_default_cursor_shape = 2 |
| 236 | text = "Start Game" |
| 237 | |
| 238 | [node name="PauseMenu" type="Control" parent="UI" groups=["pause_menu"]] |
| 239 | visible = false |
| 240 | anchor_right = 1.0 |
| 241 | anchor_bottom = 1.0 |
| 242 | mouse_filter = 2 |
| 243 | |
| 244 | [node name="CenterContainer" type="CenterContainer" parent="UI/PauseMenu"] |
| 245 | anchor_right = 1.0 |
| 246 | anchor_bottom = 1.0 |
| 247 | |
| 248 | [node name="PanelContainer" type="PanelContainer" parent="UI/PauseMenu/CenterContainer"] |
| 249 | margin_left = 25.0 |
| 250 | margin_top = 282.0 |
| 251 | margin_right = 475.0 |
| 252 | margin_bottom = 517.0 |
| 253 | rect_min_size = Vector2( 450, 235 ) |
| 254 | |
| 255 | [node name="VBoxContainer" type="VBoxContainer" parent="UI/PauseMenu/CenterContainer/PanelContainer"] |
| 256 | margin_left = 14.0 |
| 257 | margin_top = 14.0 |
| 258 | margin_right = 436.0 |
| 259 | margin_bottom = 231.0 |
| 260 | |
| 261 | [node name="Label" type="Label" parent="UI/PauseMenu/CenterContainer/PanelContainer/VBoxContainer"] |
| 262 | margin_right = 422.0 |
| 263 | margin_bottom = 37.0 |
| 264 | theme = ExtResource( 9 ) |
| 265 | text = "Paused" |
| 266 | align = 1 |
| 267 | |
| 268 | [node name="TabContainer" type="TabContainer" parent="UI/PauseMenu/CenterContainer/PanelContainer/VBoxContainer"] |
| 269 | margin_top = 45.0 |
| 270 | margin_right = 422.0 |
| 271 | margin_bottom = 172.0 |
| 272 | |
| 273 | [node name="Scores" parent="UI/PauseMenu/CenterContainer/PanelContainer/VBoxContainer/TabContainer" instance=ExtResource( 7 )] |
| 274 | |
| 275 | [node name="Pref" type="VBoxContainer" parent="UI/PauseMenu/CenterContainer/PanelContainer/VBoxContainer/TabContainer"] |
| 276 | visible = false |
| 277 | anchor_right = 1.0 |
| 278 | anchor_bottom = 1.0 |
| 279 | margin_left = 8.0 |
| 280 | margin_top = 61.0 |
| 281 | margin_right = -8.0 |
| 282 | margin_bottom = -8.0 |
| 283 | |
| 284 | [node name="AlwaysShowIntroCheckBox" type="CheckBox" parent="UI/PauseMenu/CenterContainer/PanelContainer/VBoxContainer/TabContainer/Pref"] |
| 285 | margin_right = 406.0 |
| 286 | margin_bottom = 48.0 |
| 287 | text = "Show intro dialog" |
| 288 | |
| 289 | [node name="ShowItemsInRadarCheckBox" type="CheckBox" parent="UI/PauseMenu/CenterContainer/PanelContainer/VBoxContainer/TabContainer/Pref"] |
| 290 | margin_top = 56.0 |
| 291 | margin_right = 406.0 |
| 292 | margin_bottom = 104.0 |
| 293 | text = "Show items in radar" |
| 294 | |
| 295 | [node name="About" type="VBoxContainer" parent="UI/PauseMenu/CenterContainer/PanelContainer/VBoxContainer/TabContainer"] |
| 296 | visible = false |
| 297 | anchor_right = 1.0 |
| 298 | anchor_bottom = 1.0 |
| 299 | margin_left = 8.0 |
| 300 | margin_top = 61.0 |
| 301 | margin_right = -8.0 |
| 302 | margin_bottom = -8.0 |
| 303 | |
| 304 | [node name="RichTextLabel" type="RichTextLabel" parent="UI/PauseMenu/CenterContainer/PanelContainer/VBoxContainer/TabContainer/About"] |
| 305 | margin_right = 406.0 |
| 306 | margin_bottom = 27.0 |
| 307 | rect_min_size = Vector2( 200, 0 ) |
| 308 | text = "Welcome to my Godot experiment." |
| 309 | fit_content_height = true |
| 310 | |
| 311 | [node name="LinkButton" type="LinkButton" parent="UI/PauseMenu/CenterContainer/PanelContainer/VBoxContainer/TabContainer/About"] |
| 312 | margin_top = 35.0 |
| 313 | margin_right = 406.0 |
| 314 | margin_bottom = 60.0 |
| 315 | focus_mode = 2 |
| 316 | text = "Source code" |
| 317 | |
| 318 | [node name="ResumeButton" type="Button" parent="UI/PauseMenu/CenterContainer/PanelContainer/VBoxContainer"] |
| 319 | margin_top = 180.0 |
| 320 | margin_right = 422.0 |
| 321 | margin_bottom = 217.0 |
| 322 | theme = ExtResource( 5 ) |
| 323 | text = "Resume" |
| 324 | |
| 325 | [node name="GameFinishedMenu" type="Control" parent="UI"] |
| 326 | pause_mode = 2 |
| 327 | visible = false |
| 328 | anchor_right = 1.0 |
| 329 | anchor_bottom = 1.0 |
| 330 | mouse_filter = 2 |
| 331 | |
| 332 | [node name="CenterContainer" type="CenterContainer" parent="UI/GameFinishedMenu"] |
| 333 | anchor_right = 1.0 |
| 334 | anchor_bottom = 1.0 |
| 335 | |
| 336 | [node name="PanelContainer" type="PanelContainer" parent="UI/GameFinishedMenu/CenterContainer"] |
| 337 | margin_left = 236.0 |
| 338 | margin_top = 386.0 |
| 339 | margin_right = 264.0 |
| 340 | margin_bottom = 414.0 |
| 341 | |
| 342 | [node name="VBoxContainer" type="VBoxContainer" parent="UI/GameFinishedMenu/CenterContainer/PanelContainer"] |
| 343 | margin_left = 14.0 |
| 344 | margin_top = 14.0 |
| 345 | margin_right = 220.0 |
| 346 | margin_bottom = 217.0 |
| 347 | |
| 348 | [node name="Label" type="Label" parent="UI/GameFinishedMenu/CenterContainer/PanelContainer/VBoxContainer"] |
| 349 | margin_right = 206.0 |
| 350 | margin_bottom = 80.0 |
| 351 | theme = ExtResource( 9 ) |
| 352 | text = "You've won!" |
| 353 | align = 1 |
| 354 | valign = 1 |
| 355 | autowrap = true |
| 356 | |
| 357 | [node name="Scores" parent="UI/GameFinishedMenu/CenterContainer/PanelContainer/VBoxContainer" instance=ExtResource( 7 )] |
| 358 | anchor_right = 0.0 |
| 359 | anchor_bottom = 0.0 |
| 360 | margin_left = 0.0 |
| 361 | margin_top = 88.0 |
| 362 | margin_right = 206.0 |
| 363 | margin_bottom = 146.0 |
| 364 | |
| 365 | [node name="Button" type="Button" parent="UI/GameFinishedMenu/CenterContainer/PanelContainer/VBoxContainer"] |
| 366 | margin_top = 154.0 |
| 367 | margin_right = 206.0 |
| 368 | margin_bottom = 203.0 |
| 369 | theme = ExtResource( 9 ) |
| 370 | text = "Replay!" |
| 371 | |
| 372 | [node name="Camera2D" type="Camera2D" parent="."] |
| 373 | current = true |
| 374 | |
| 375 | [node name="NavigationObstacle2D" type="NavigationObstacle2D" parent="."] |
| 376 | estimate_radius = false |
| 377 | radius = 35.0 |
| 378 | |
| 379 | [connection signal="debug_signal" from="UI/HUD" to="." method="_on_HUD_debug_signal"] |
| 380 | [connection signal="paused" from="UI/HUD" to="." method="_on_HUD_paused"] |
| 381 | [connection signal="position_set" from="UI/HUD" to="." method="_on_HUD_position_set"] |
| 382 | [connection signal="pressed" from="UI/DeathScreen/CenterContainer/PanelContainer/VBoxContainer/StartNewGameButton" to="." method="_on_StartNewGameButton_pressed"] |
| 383 | [connection signal="pressed" from="UI/IntroMenu/CenterContainer/PanelContainer/VBoxContainer/StartButton" to="." method="_on_StartButton_pressed"] |
| 384 | [connection signal="pressed" from="UI/PauseMenu/CenterContainer/PanelContainer/VBoxContainer/TabContainer/Pref/AlwaysShowIntroCheckBox" to="." method="_on_PauseAlwaysShowIntroCheckBox_pressed"] |
| 385 | [connection signal="pressed" from="UI/PauseMenu/CenterContainer/PanelContainer/VBoxContainer/TabContainer/Pref/ShowItemsInRadarCheckBox" to="." method="_on_ShowItemsInRadarCheckBox_pressed"] |
| 386 | [connection signal="pressed" from="UI/PauseMenu/CenterContainer/PanelContainer/VBoxContainer/TabContainer/About/LinkButton" to="." method="_on_LinkButton_pressed"] |
| 387 | [connection signal="pressed" from="UI/PauseMenu/CenterContainer/PanelContainer/VBoxContainer/ResumeButton" to="." method="_on_ResumeButton_pressed"] |
| 388 | [connection signal="pressed" from="UI/GameFinishedMenu/CenterContainer/PanelContainer/VBoxContainer/Button" to="." method="_on_Button_pressed"] |