scene_instancing.tscn 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. [gd_scene load_steps=13 format=3 uid="uid://rcsr8t4nw526"]
  2. [ext_resource type="Script" path="res://ball_factory.gd" id="1"]
  3. [ext_resource type="PackedScene" uid="uid://cgx884jv27maj" path="res://ball.tscn" id="2"]
  4. [sub_resource type="PhysicsMaterial" id="1"]
  5. bounce = 0.4
  6. [sub_resource type="PhysicsMaterial" id="2"]
  7. bounce = 0.4
  8. [sub_resource type="PhysicsMaterial" id="3"]
  9. bounce = 0.4
  10. [sub_resource type="PhysicsMaterial" id="4"]
  11. bounce = 0.4
  12. [sub_resource type="PhysicsMaterial" id="5"]
  13. bounce = 0.4
  14. [sub_resource type="PhysicsMaterial" id="6"]
  15. bounce = 0.4
  16. [sub_resource type="PhysicsMaterial" id="7"]
  17. bounce = 0.4
  18. [sub_resource type="PhysicsMaterial" id="8"]
  19. bounce = 0.4
  20. [sub_resource type="PhysicsMaterial" id="9"]
  21. bounce = 0.4
  22. [sub_resource type="PhysicsMaterial" id="10"]
  23. bounce = 0.4
  24. [node name="SceneInstancing" type="Node2D"]
  25. [node name="CanvasLayer" type="CanvasLayer" parent="."]
  26. [node name="InfoLabel" type="Label" parent="CanvasLayer"]
  27. offset_left = 16.0
  28. offset_top = 16.0
  29. offset_right = 370.0
  30. offset_bottom = 42.0
  31. text = "Click the mouse to spawn a new Ball instance."
  32. horizontal_alignment = 1
  33. metadata/_edit_use_anchors_ = true
  34. [node name="BallFactory" type="Node2D" parent="."]
  35. script = ExtResource("1")
  36. [node name="Static" type="StaticBody2D" parent="."]
  37. position = Vector2(184, 32)
  38. [node name="Collision" type="CollisionPolygon2D" parent="Static"]
  39. polygon = PackedVector2Array(8.68994, 22.1976, 50.4445, 556.656, 292.621, 501.54, 335.36, 550.855, 510.039, 563.135, 542.137, 526.368, 567.463, 515.822, 612.463, 506.822, 667.291, 495.079, 747.553, 553.575, 793.806, 6.70509, 802.465, 601.097, 4.43558, 596.186)
  40. [node name="Polygon2D" type="Polygon2D" parent="Static"]
  41. color = Color(1, 0.266667, 0.419608, 1)
  42. polygon = PackedVector2Array(8.68994, 22.1976, 50.4445, 556.656, 292.621, 501.54, 335.36, 550.855, 510.039, 563.135, 542.137, 526.368, 567.463, 515.822, 612.463, 506.822, 667.291, 495.079, 747.553, 553.575, 793.806, 6.70509, 802.465, 601.097, 4.43558, 596.186)
  43. [node name="Ball1" parent="." instance=ExtResource("2")]
  44. position = Vector2(407.823, 193.773)
  45. physics_material_override = SubResource("1")
  46. [node name="Ball2" parent="." instance=ExtResource("2")]
  47. position = Vector2(572.078, 245.215)
  48. physics_material_override = SubResource("2")
  49. [node name="Ball3" parent="." instance=ExtResource("2")]
  50. position = Vector2(623.52, 136.013)
  51. physics_material_override = SubResource("3")
  52. [node name="Ball4" parent="." instance=ExtResource("2")]
  53. position = Vector2(419.555, 368.858)
  54. physics_material_override = SubResource("4")
  55. [node name="Ball5" parent="." instance=ExtResource("2")]
  56. position = Vector2(693.555, 394.858)
  57. physics_material_override = SubResource("5")
  58. [node name="Ball6" parent="." instance=ExtResource("2")]
  59. position = Vector2(819.555, 179.858)
  60. physics_material_override = SubResource("6")
  61. [node name="Ball7" parent="." instance=ExtResource("2")]
  62. position = Vector2(815.872, 357.88)
  63. physics_material_override = SubResource("7")
  64. [node name="Ball8" parent="." instance=ExtResource("2")]
  65. position = Vector2(713.97, 237.561)
  66. physics_material_override = SubResource("8")
  67. [node name="Ball9" parent="." instance=ExtResource("2")]
  68. position = Vector2(285.489, 199.502)
  69. physics_material_override = SubResource("9")
  70. [node name="Ball10" parent="." instance=ExtResource("2")]
  71. position = Vector2(327.756, 327.139)
  72. physics_material_override = SubResource("10")
  73. [node name="Camera2D" type="Camera2D" parent="."]
  74. offset = Vector2(576, 324)