main.tscn 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. [gd_scene load_steps=10 format=2]
  2. [ext_resource path="res://image/ball.png" type="Texture" id=1]
  3. [ext_resource path="res://image/brik.png" type="Texture" id=2]
  4. [sub_resource type="PhysicsMaterial" id=5]
  5. friction = 0.0
  6. bounce = 1.0
  7. [sub_resource type="RectangleShape2D" id=6]
  8. extents = Vector2( 50, 300 )
  9. [sub_resource type="RectangleShape2D" id=7]
  10. extents = Vector2( 300, 50 )
  11. [sub_resource type="ConvexPolygonShape2D" id=1]
  12. points = PoolVector2Array( 0, 0, 40, 0, 40, 20, 0, 20 )
  13. [sub_resource type="TileSet" id=2]
  14. 0/name = "brik.png 0"
  15. 0/texture = ExtResource( 2 )
  16. 0/tex_offset = Vector2( 0, 0 )
  17. 0/modulate = Color( 1, 1, 1, 1 )
  18. 0/region = Rect2( 0, 0, 40, 20 )
  19. 0/tile_mode = 0
  20. 0/occluder_offset = Vector2( 0, 0 )
  21. 0/navigation_offset = Vector2( 0, 0 )
  22. 0/shapes = [ {
  23. "autotile_coord": Vector2( 0, 0 ),
  24. "one_way": false,
  25. "one_way_margin": 1.0,
  26. "shape": SubResource( 1 ),
  27. "shape_transform": Transform2D( 1, 0, 0, 1, 0, 0 )
  28. } ]
  29. 0/z_index = 0
  30. [sub_resource type="PhysicsMaterial" id=4]
  31. friction = 0.0
  32. bounce = 1.0
  33. [sub_resource type="CircleShape2D" id=3]
  34. [node name="Node2D" type="Node2D"]
  35. [node name="Walls" type="StaticBody2D" parent="."]
  36. physics_material_override = SubResource( 5 )
  37. [node name="Left" type="CollisionShape2D" parent="Walls"]
  38. position = Vector2( -50, 200 )
  39. shape = SubResource( 6 )
  40. [node name="Right" type="CollisionShape2D" parent="Walls"]
  41. position = Vector2( 450, 200 )
  42. shape = SubResource( 6 )
  43. [node name="Top" type="CollisionShape2D" parent="Walls"]
  44. position = Vector2( 200, -50 )
  45. shape = SubResource( 7 )
  46. [node name="Grid" type="TileMap" parent="."]
  47. mode = 2
  48. tile_set = SubResource( 2 )
  49. cell_size = Vector2( 40, 20 )
  50. cell_custom_transform = Transform2D( 40, 0, 0, 20, 0, 0 )
  51. format = 1
  52. 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, 1245184, 0, 0, 1245185, 0, 0, 1245186, 0, 0, 1245187, 0, 0, 1245188, 0, 0, 1245189, 0, 0, 1245190, 0, 0, 1245191, 0, 0, 1245192, 0, 0, 1245193, 0, 0 )
  53. [node name="Ball" type="RigidBody2D" parent="."]
  54. mode = 2
  55. physics_material_override = SubResource( 4 )
  56. gravity_scale = 0.0
  57. linear_velocity = Vector2( 100, 100 )
  58. linear_damp = 0.0
  59. [node name="Circle" type="CollisionShape2D" parent="Ball"]
  60. position = Vector2( 180.82, 302.182 )
  61. shape = SubResource( 3 )
  62. [node name="Sprite" type="Sprite" parent="Ball"]
  63. position = Vector2( 180.82, 302.182 )
  64. texture = ExtResource( 1 )