Game.tscn 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. [gd_scene load_steps=7 format=2]
  2. [ext_resource path="res://basic.png" type="Texture" id=1]
  3. [ext_resource path="res://Player.gd" type="Script" id=2]
  4. [ext_resource path="res://player.png" type="Texture" id=3]
  5. [ext_resource path="res://Obstacle.tscn" type="PackedScene" id=5]
  6. [sub_resource type="TileSet" id=1]
  7. 0/name = "basic.png 0"
  8. 0/texture = ExtResource( 1 )
  9. 0/tex_offset = Vector2( 0, 0 )
  10. 0/modulate = Color( 1, 1, 1, 1 )
  11. 0/region = Rect2( 0, 0, 64, 64 )
  12. 0/tile_mode = 0
  13. 0/occluder_offset = Vector2( 0, 0 )
  14. 0/navigation_offset = Vector2( 0, 0 )
  15. 0/shapes = [ ]
  16. 0/z_index = 0
  17. 1/name = "basic.png 1"
  18. 1/texture = ExtResource( 1 )
  19. 1/tex_offset = Vector2( 0, 0 )
  20. 1/modulate = Color( 1, 1, 1, 1 )
  21. 1/region = Rect2( 64, 0, 64, 64 )
  22. 1/tile_mode = 0
  23. 1/occluder_offset = Vector2( 0, 0 )
  24. 1/navigation_offset = Vector2( 0, 0 )
  25. 1/shapes = [ ]
  26. 1/z_index = 0
  27. [sub_resource type="RectangleShape2D" id=2]
  28. extents = Vector2( 16, 16 )
  29. [node name="Game" type="Node2D"]
  30. [node name="Grid" type="TileMap" parent="."]
  31. tile_set = SubResource( 1 )
  32. format = 1
  33. tile_data = PoolIntArray( 0, 0, 0, 1, 1, 0, 2, 0, 0, 3, 1, 0, 4, 0, 0, 5, 1, 0, 6, 0, 0, 7, 1, 0, 8, 0, 0, 9, 1, 0, 10, 0, 0, 11, 1, 0, 12, 0, 0, 13, 1, 0, 14, 0, 0, 15, 1, 0, 65536, 1, 0, 65537, 0, 0, 65538, 1, 0, 65539, 0, 0, 65540, 1, 0, 65541, 0, 0, 65542, 1, 0, 65543, 0, 0, 65544, 1, 0, 65545, 0, 0, 65546, 1, 0, 65547, 0, 0, 65548, 1, 0, 65549, 0, 0, 65550, 1, 0, 65551, 0, 0, 131072, 0, 0, 131073, 1, 0, 131074, 0, 0, 131075, 1, 0, 131076, 0, 0, 131077, 1, 0, 131078, 0, 0, 131079, 1, 0, 131080, 0, 0, 131081, 1, 0, 131082, 0, 0, 131083, 1, 0, 131084, 0, 0, 131085, 1, 0, 131086, 0, 0, 131087, 1, 0, 196608, 1, 0, 196609, 0, 0, 196610, 1, 0, 196611, 0, 0, 196612, 1, 0, 196613, 0, 0, 196614, 1, 0, 196615, 0, 0, 196616, 1, 0, 196617, 0, 0, 196618, 1, 0, 196619, 0, 0, 196620, 1, 0, 196621, 0, 0, 196622, 1, 0, 196623, 0, 0, 262144, 0, 0, 262145, 1, 0, 262146, 0, 0, 262147, 1, 0, 262148, 0, 0, 262149, 1, 0, 262150, 0, 0, 262151, 1, 0, 262152, 0, 0, 262153, 1, 0, 262154, 0, 0, 262155, 1, 0, 262156, 0, 0, 262157, 1, 0, 262158, 0, 0, 262159, 1, 0, 327680, 1, 0, 327681, 0, 0, 327682, 1, 0, 327683, 0, 0, 327684, 1, 0, 327685, 0, 0, 327686, 1, 0, 327687, 0, 0, 327688, 1, 0, 327689, 0, 0, 327690, 1, 0, 327691, 0, 0, 327692, 1, 0, 327693, 0, 0, 327694, 1, 0, 327695, 0, 0, 393216, 0, 0, 393217, 1, 0, 393218, 0, 0, 393219, 1, 0, 393220, 0, 0, 393221, 1, 0, 393222, 0, 0, 393223, 1, 0, 393224, 0, 0, 393225, 1, 0, 393226, 0, 0, 393227, 1, 0, 393228, 0, 0, 393229, 1, 0, 393230, 0, 0, 393231, 1, 0, 458752, 1, 0, 458753, 0, 0, 458754, 1, 0, 458755, 0, 0, 458756, 1, 0, 458757, 0, 0, 458758, 1, 0, 458759, 0, 0, 458760, 1, 0, 458761, 0, 0, 458762, 1, 0, 458763, 0, 0, 458764, 1, 0, 458765, 0, 0, 458766, 1, 0, 458767, 0, 0, 524288, 0, 0, 524289, 1, 0, 524290, 0, 0, 524291, 1, 0, 524292, 0, 0, 524293, 1, 0, 524294, 0, 0, 524295, 1, 0, 524296, 0, 0, 524297, 1, 0, 524298, 0, 0, 524299, 1, 0, 524300, 0, 0, 524301, 1, 0, 524302, 0, 0, 524303, 1, 0 )
  34. [node name="Player" type="Area2D" parent="Grid"]
  35. position = Vector2( 544, 224 )
  36. script = ExtResource( 2 )
  37. rayU = NodePath("RayUp")
  38. rayD = NodePath("RayDown")
  39. rayL = NodePath("RayLeft")
  40. rayR = NodePath("RayRight")
  41. [node name="Sprite" type="Sprite" parent="Grid/Player"]
  42. texture = ExtResource( 3 )
  43. __meta__ = {
  44. "_edit_lock_": true
  45. }
  46. [node name="CollisionShape2D" type="CollisionShape2D" parent="Grid/Player"]
  47. shape = SubResource( 2 )
  48. __meta__ = {
  49. "_edit_lock_": true
  50. }
  51. [node name="RayUp" type="RayCast2D" parent="Grid/Player"]
  52. position = Vector2( 0, -32 )
  53. enabled = true
  54. exclude_parent = false
  55. cast_to = Vector2( 0, -32 )
  56. collide_with_areas = true
  57. collide_with_bodies = false
  58. __meta__ = {
  59. "_edit_lock_": true
  60. }
  61. [node name="RayDown" type="RayCast2D" parent="Grid/Player"]
  62. position = Vector2( 0, 32 )
  63. enabled = true
  64. exclude_parent = false
  65. cast_to = Vector2( 0, 32 )
  66. collide_with_areas = true
  67. collide_with_bodies = false
  68. __meta__ = {
  69. "_edit_lock_": true
  70. }
  71. [node name="RayLeft" type="RayCast2D" parent="Grid/Player"]
  72. position = Vector2( -32, 0 )
  73. enabled = true
  74. exclude_parent = false
  75. cast_to = Vector2( -32, 0 )
  76. collide_with_areas = true
  77. collide_with_bodies = false
  78. __meta__ = {
  79. "_edit_lock_": true
  80. }
  81. [node name="RayRight" type="RayCast2D" parent="Grid/Player"]
  82. position = Vector2( 32, 0 )
  83. enabled = true
  84. exclude_parent = false
  85. cast_to = Vector2( 32, 0 )
  86. collide_with_areas = true
  87. collide_with_bodies = false
  88. __meta__ = {
  89. "_edit_lock_": true
  90. }
  91. [node name="Obstacle" parent="Grid" instance=ExtResource( 5 )]
  92. position = Vector2( 672, 352 )