main.tscn 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. [gd_scene load_steps=14 format=2]
  2. [ext_resource path="res://component/ui/message_panel/MessagePanel.tscn" type="PackedScene" id=1]
  3. [ext_resource path="res://component/entity/launcher/TargetLine.gd" type="Script" id=2]
  4. [ext_resource path="res://component/entity/catcher/Catcher.tscn" type="PackedScene" id=3]
  5. [ext_resource path="res://component/ui/LifeContainer.gd" type="Script" id=4]
  6. [ext_resource path="res://component/ui/UI.gd" type="Script" id=5]
  7. [ext_resource path="res://component/ui/number_panel/NumberPanel.tscn" type="PackedScene" id=6]
  8. [ext_resource path="res://component/entity/death/DeadLine.gd" type="Script" id=7]
  9. [ext_resource path="res://component/entity/launcher/Launcher.gd" type="Script" id=8]
  10. [ext_resource path="res://component/entity/brick/brick_tileset.tres" type="TileSet" id=9]
  11. [ext_resource path="res://component/entity/launcher/visor.png" type="Texture" id=10]
  12. [ext_resource path="res://component/entity/launcher/launcher.png" type="Texture" id=11]
  13. [ext_resource path="res://component/entity/brick/Grid.gd" type="Script" id=12]
  14. [ext_resource path="res://component/entity/border/Border.tscn" type="PackedScene" id=13]
  15. [node name="Game" type="Node"]
  16. [node name="Background" type="Panel" parent="."]
  17. margin_right = 400.0
  18. margin_bottom = 400.0
  19. __meta__ = {
  20. "_edit_use_anchors_": false
  21. }
  22. [node name="Border" parent="." instance=ExtResource( 13 )]
  23. [node name="Catcher" parent="." instance=ExtResource( 3 )]
  24. [node name="Launcher" type="Node2D" parent="."]
  25. script = ExtResource( 8 )
  26. visor_ratio = 1.6
  27. [node name="Grid" type="TileMap" parent="Launcher" groups=[
  28. "grid",
  29. ]]
  30. mode = 2
  31. tile_set = ExtResource( 9 )
  32. cell_size = Vector2( 40, 20 )
  33. cell_custom_transform = Transform2D( 40, 0, 0, 20, 0, 0 )
  34. collision_layer = 4
  35. collision_mask = 8
  36. format = 1
  37. script = ExtResource( 12 )
  38. [node name="LifeContainer" type="Node2D" parent="Launcher/Grid"]
  39. script = ExtResource( 4 )
  40. [node name="MoveDown" type="Tween" parent="Launcher/Grid"]
  41. __meta__ = {
  42. "_editor_description_": "Move grid to show the new row"
  43. }
  44. [node name="TargetLine" type="RayCast2D" parent="Launcher"]
  45. position = Vector2( 200, 400 )
  46. collision_mask = 6
  47. script = ExtResource( 2 )
  48. [node name="TargetVisor" type="Sprite" parent="Launcher/TargetLine"]
  49. texture = ExtResource( 10 )
  50. [node name="Source" type="Sprite" parent="Launcher"]
  51. position = Vector2( 200, 400 )
  52. texture = ExtResource( 11 )
  53. [node name="ShootDelay" type="Timer" parent="Launcher"]
  54. wait_time = 0.1
  55. one_shot = true
  56. [node name="DeadLine" type="RayCast2D" parent="Launcher"]
  57. position = Vector2( 380, 390 )
  58. cast_to = Vector2( -360, 0 )
  59. collision_mask = 4
  60. script = ExtResource( 7 )
  61. [node name="UI" type="Control" parent="."]
  62. margin_right = 40.0
  63. margin_bottom = 40.0
  64. script = ExtResource( 5 )
  65. __meta__ = {
  66. "_edit_use_anchors_": false
  67. }
  68. [node name="GameOverPanel" parent="UI" instance=ExtResource( 1 )]
  69. visible = false
  70. message = "Game Over!"
  71. [node name="TutorialPanel" parent="UI" instance=ExtResource( 1 )]
  72. message = "Click to shoot a ball!"
  73. [node name="ScoreCounter" parent="UI" instance=ExtResource( 6 )]
  74. margin_left = 350.0
  75. margin_top = 360.0
  76. margin_right = 390.0
  77. margin_bottom = 390.0
  78. title = "Score"
  79. [node name="BallCounter" parent="UI" instance=ExtResource( 6 )]
  80. margin_left = 10.0
  81. margin_top = 360.0
  82. margin_right = 50.0
  83. margin_bottom = 390.0
  84. title = "Balls"
  85. [connection signal="ready" from="." to="UI/BallCounter" method="increase_counter"]
  86. [connection signal="gain_new_bullet" from="Launcher" to="UI/BallCounter" method="increase_counter"]
  87. [connection signal="get_firing" from="Launcher" to="UI" method="_on_Launcher_get_firing"]
  88. [connection signal="get_firing" from="Launcher" to="Launcher" method="_on_Launcher_get_firing"]
  89. [connection signal="is_full" from="Launcher" to="Launcher/Grid" method="_on_Launcher_is_full"]
  90. [connection signal="move_visor" from="Launcher" to="Launcher/TargetLine" method="_on_Launcher_move_visor"]
  91. [connection signal="has_moved" from="Launcher/Grid" to="Launcher" method="_on_Grid_has_moved"]
  92. [connection signal="has_moved" from="Launcher/Grid" to="Launcher/DeadLine" method="_on_Grid_has_moved"]
  93. [connection signal="kace_broken" from="Launcher/Grid" to="Launcher" method="_on_Grid_kace_broken"]
  94. [connection signal="kace_damaged" from="Launcher/Grid" to="UI/ScoreCounter" method="increase_counter"]
  95. [connection signal="tween_all_completed" from="Launcher/Grid/MoveDown" to="Launcher/Grid" method="_on_MoveDown_tween_all_completed"]
  96. [connection signal="timeout" from="Launcher/ShootDelay" to="Launcher" method="_on_ShootDelay_timeout"]
  97. [connection signal="game_lost" from="Launcher/DeadLine" to="UI" method="_on_DeadLine_game_lost"]
  98. [connection signal="game_lost" from="Launcher/DeadLine" to="Launcher" method="_on_DeadLine_game_lost"]