main.tscn 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. [gd_scene load_steps=12 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. [sub_resource type="PhysicsMaterial" id=1]
  8. friction = 0.0
  9. bounce = 1.0
  10. [sub_resource type="RectangleShape2D" id=2]
  11. extents = Vector2( 50, 300 )
  12. [sub_resource type="RectangleShape2D" id=3]
  13. extents = Vector2( 300, 50 )
  14. [sub_resource type="RectangleShape2D" id=6]
  15. extents = Vector2( 200, 50 )
  16. [sub_resource type="ConvexPolygonShape2D" id=4]
  17. points = PoolVector2Array( 0, 0, 40, 0, 40, 20, 0, 20 )
  18. [sub_resource type="TileSet" id=5]
  19. 0/name = "brik.png 0"
  20. 0/texture = ExtResource( 2 )
  21. 0/tex_offset = Vector2( 0, 0 )
  22. 0/modulate = Color( 1, 1, 1, 1 )
  23. 0/region = Rect2( 0, 0, 40, 20 )
  24. 0/tile_mode = 0
  25. 0/occluder_offset = Vector2( 0, 0 )
  26. 0/navigation_offset = Vector2( 0, 0 )
  27. 0/shapes = [ {
  28. "autotile_coord": Vector2( 0, 0 ),
  29. "one_way": false,
  30. "one_way_margin": 1.0,
  31. "shape": SubResource( 4 ),
  32. "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
  33. } ]
  34. 0/z_index = 0
  35. [node name="Root" type="Node2D"]
  36. [node name="Walls" type="StaticBody2D" parent="."]
  37. physics_material_override = SubResource( 1 )
  38. [node name="Left" type="CollisionShape2D" parent="Walls"]
  39. position = Vector2( -50, 200 )
  40. shape = SubResource( 2 )
  41. [node name="Right" type="CollisionShape2D" parent="Walls"]
  42. position = Vector2( 450, 200 )
  43. shape = SubResource( 2 )
  44. [node name="Top" type="CollisionShape2D" parent="Walls"]
  45. position = Vector2( 200, -50 )
  46. shape = SubResource( 3 )
  47. [node name="Catcher" type="Area2D" parent="."]
  48. position = Vector2( 200, 470 )
  49. script = ExtResource( 3 )
  50. [node name="Area" type="CollisionShape2D" parent="Catcher"]
  51. shape = SubResource( 6 )
  52. [node name="Launcher" type="Node2D" parent="."]
  53. script = ExtResource( 4 )
  54. [node name="Grid" type="TileMap" parent="Launcher"]
  55. mode = 2
  56. tile_set = SubResource( 5 )
  57. cell_size = Vector2( 40, 20 )
  58. cell_custom_transform = Transform2D( 40, 0, 0, 20, 0, 0 )
  59. format = 1
  60. tile_data = PoolIntArray( 65540, 0, 0, 65541, 0, 0, 393217, 0, 0, 393218, 0, 0, 393223, 0, 0, 393224, 0, 0, 458753, 0, 0, 458754, 0, 0, 458759, 0, 0, 458760, 0, 0, 524289, 0, 0, 524290, 0, 0, 524295, 0, 0, 524296, 0, 0, 720899, 0, 0, 720900, 0, 0, 720901, 0, 0, 720902, 0, 0 )
  61. [node name="Target" type="Sprite" parent="Launcher"]
  62. position = Vector2( 200, 400 )
  63. texture = ExtResource( 5 )
  64. [node name="Source" type="Sprite" parent="Launcher"]
  65. position = Vector2( 200, 400 )
  66. texture = ExtResource( 1 )
  67. [node name="ShootDelay" type="Timer" parent="Launcher"]
  68. wait_time = 0.3
  69. one_shot = true
  70. [connection signal="body_entered" from="Catcher" to="Catcher" method="_on_Catcher_body_entered"]
  71. [connection signal="get_firing" from="Launcher" to="Launcher" method="_on_Launcher_get_firing"]
  72. [connection signal="timeout" from="Launcher/ShootDelay" to="Launcher" method="_on_ShootDelay_timeout"]