main.tscn 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. [gd_scene load_steps=13 format=2]
  2. [ext_resource path="res://image/launcher.png" type="Texture" id=1]
  3. [ext_resource path="res://image/brik.png" type="Texture" id=2]
  4. [ext_resource path="res://scripts/Catcher.gd" type="Script" id=3]
  5. [ext_resource path="res://scripts/Launcher.gd" type="Script" id=4]
  6. [ext_resource path="res://image/visor.png" type="Texture" id=5]
  7. [ext_resource path="res://scripts/Grid.gd" type="Script" id=6]
  8. [sub_resource type="PhysicsMaterial" id=1]
  9. friction = 0.0
  10. bounce = 1.0
  11. [sub_resource type="RectangleShape2D" id=2]
  12. extents = Vector2( 50, 300 )
  13. [sub_resource type="RectangleShape2D" id=3]
  14. extents = Vector2( 300, 50 )
  15. [sub_resource type="RectangleShape2D" id=4]
  16. extents = Vector2( 200, 50 )
  17. [sub_resource type="ConvexPolygonShape2D" id=5]
  18. points = PoolVector2Array( 0, 0, 40, 0, 40, 20, 0, 20 )
  19. [sub_resource type="TileSet" id=6]
  20. 0/name = "brik.png 0"
  21. 0/texture = ExtResource( 2 )
  22. 0/tex_offset = Vector2( 0, 0 )
  23. 0/modulate = Color( 1, 1, 1, 1 )
  24. 0/region = Rect2( 0, 0, 40, 20 )
  25. 0/tile_mode = 0
  26. 0/occluder_offset = Vector2( 0, 0 )
  27. 0/navigation_offset = Vector2( 0, 0 )
  28. 0/shapes = [ {
  29. "autotile_coord": Vector2( 0, 0 ),
  30. "one_way": false,
  31. "one_way_margin": 1.0,
  32. "shape": SubResource( 5 ),
  33. "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
  34. } ]
  35. 0/z_index = 0
  36. [node name="Root" type="Node2D"]
  37. [node name="Walls" type="StaticBody2D" parent="."]
  38. physics_material_override = SubResource( 1 )
  39. [node name="Left" type="CollisionShape2D" parent="Walls"]
  40. position = Vector2( -50, 200 )
  41. shape = SubResource( 2 )
  42. [node name="Right" type="CollisionShape2D" parent="Walls"]
  43. position = Vector2( 450, 200 )
  44. shape = SubResource( 2 )
  45. [node name="Top" type="CollisionShape2D" parent="Walls"]
  46. position = Vector2( 200, -50 )
  47. shape = SubResource( 3 )
  48. [node name="Catcher" type="Area2D" parent="."]
  49. position = Vector2( 200, 470 )
  50. script = ExtResource( 3 )
  51. [node name="Area" type="CollisionShape2D" parent="Catcher"]
  52. shape = SubResource( 4 )
  53. [node name="Launcher" type="Node2D" parent="."]
  54. script = ExtResource( 4 )
  55. [node name="Grid" type="TileMap" parent="Launcher"]
  56. mode = 2
  57. tile_set = SubResource( 6 )
  58. cell_size = Vector2( 40, 20 )
  59. cell_custom_transform = Transform2D( 40, 0, 0, 20, 0, 0 )
  60. format = 1
  61. tile_data = PoolIntArray( 0, 0, 0, 1, 0, 0, 2, 0, 0, 3, 0, 0, 4, 0, 0, 5, 0, 0, 6, 0, 0, 7, 0, 0, 8, 0, 0, 9, 0, 0, 65536, 0, 0, 65537, 0, 0, 65538, 0, 0, 65539, 0, 0, 65540, 0, 0, 65541, 0, 0, 65542, 0, 0, 65543, 0, 0, 65544, 0, 0, 65545, 0, 0 )
  62. script = ExtResource( 6 )
  63. [node name="Target" type="Sprite" parent="Launcher"]
  64. position = Vector2( 200, 400 )
  65. texture = ExtResource( 5 )
  66. [node name="Source" type="Sprite" parent="Launcher"]
  67. position = Vector2( 200, 400 )
  68. texture = ExtResource( 1 )
  69. [node name="ShootDelay" type="Timer" parent="Launcher"]
  70. wait_time = 0.3
  71. one_shot = true
  72. [connection signal="body_entered" from="Catcher" to="Catcher" method="_on_Catcher_body_entered"]
  73. [connection signal="get_firing" from="Launcher" to="Launcher" method="_on_Launcher_get_firing"]
  74. [connection signal="kace_broken" from="Launcher/Grid" to="Launcher" method="_on_Grid_kace_broken"]
  75. [connection signal="timeout" from="Launcher/ShootDelay" to="Launcher" method="_on_ShootDelay_timeout"]