Node.tscn 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. [gd_scene load_steps=7 format=2]
  2. [ext_resource path="res://Player.gd" type="Script" id=1]
  3. [ext_resource path="res://icon.png" type="Texture" id=2]
  4. [ext_resource path="res://enemy.gd" type="Script" id=3]
  5. [ext_resource path="res://sky-1.jpg" type="Texture" id=4]
  6. [sub_resource type="RectangleShape2D" id=1]
  7. custom_solver_bias = 0.0
  8. extents = Vector2( 10, 10 )
  9. [sub_resource type="RectangleShape2D" id=2]
  10. custom_solver_bias = 0.0
  11. extents = Vector2( 10, 10 )
  12. [node name="World" type="Node"]
  13. [node name="Camera2D" type="Camera2D" parent="." index="0"]
  14. visible = false
  15. position = Vector2( 512.095, 300.44 )
  16. anchor_mode = 1
  17. rotating = false
  18. current = false
  19. zoom = Vector2( 1, 1 )
  20. limit_left = -10000000
  21. limit_top = -10000000
  22. limit_right = 10000000
  23. limit_bottom = 10000000
  24. limit_smoothed = false
  25. drag_margin_h_enabled = true
  26. drag_margin_v_enabled = true
  27. smoothing_enabled = false
  28. smoothing_speed = 5.0
  29. offset_v = 0.0
  30. offset_h = 0.0
  31. drag_margin_left = 0.2
  32. drag_margin_top = 0.2
  33. drag_margin_right = 0.2
  34. drag_margin_bottom = 0.2
  35. editor_draw_screen = true
  36. editor_draw_limits = false
  37. editor_draw_drag_margin = false
  38. _sections_unfolded = [ "Transform" ]
  39. [node name="Player" type="KinematicBody2D" parent="." index="1"]
  40. position = Vector2( 116.464, 280.895 )
  41. input_pickable = false
  42. collision_layer = 1
  43. collision_mask = 1
  44. collision/safe_margin = 0.08
  45. script = ExtResource( 1 )
  46. _sections_unfolded = [ "Transform", "collision" ]
  47. SPEED = 200
  48. [node name="CollisionShape2D" type="CollisionShape2D" parent="Player" index="0"]
  49. scale = Vector2( 3, 3 )
  50. shape = SubResource( 1 )
  51. _sections_unfolded = [ "Transform" ]
  52. [node name="icon" type="Sprite" parent="Player" index="1"]
  53. position = Vector2( -2.38309, 1.46347 )
  54. texture = ExtResource( 2 )
  55. [node name="Position2D" type="Position2D" parent="Player" index="2"]
  56. position = Vector2( 128.062, -1.93759 )
  57. [node name="Timer" type="Timer" parent="Player" index="3"]
  58. process_mode = 1
  59. wait_time = 1.0
  60. one_shot = false
  61. autostart = false
  62. [node name="renemy" type="Area2D" parent="." index="2"]
  63. position = Vector2( 873.417, 345.372 )
  64. input_pickable = true
  65. gravity_vec = Vector2( 0, 1 )
  66. gravity = 98.0
  67. linear_damp = 0.1
  68. angular_damp = 1.0
  69. audio_bus_override = false
  70. audio_bus_name = "Master"
  71. script = ExtResource( 3 )
  72. speed = 200
  73. [node name="CollisionShape2D" type="CollisionShape2D" parent="renemy" index="0"]
  74. scale = Vector2( 2.33625, 2.16546 )
  75. shape = SubResource( 2 )
  76. _sections_unfolded = [ "Transform" ]
  77. [node name="icon2" type="Sprite" parent="renemy" index="1"]
  78. position = Vector2( 1.50732, 1.50739 )
  79. texture = ExtResource( 2 )
  80. _sections_unfolded = [ "Offset", "Transform" ]
  81. [node name="ParallaxBackground" type="ParallaxBackground" parent="." index="3"]
  82. layer = -1
  83. offset = Vector2( 0, 0 )
  84. rotation = 0.0
  85. scale = Vector2( 1, 1 )
  86. transform = Transform2D( 1, 0, 0, 1, 0, 0 )
  87. scroll_offset = Vector2( 0, 0 )
  88. scroll_base_offset = Vector2( 0, 0 )
  89. scroll_base_scale = Vector2( 1, 1 )
  90. scroll_limit_begin = Vector2( 0, 0 )
  91. scroll_limit_end = Vector2( 0, 0 )
  92. scroll_ignore_camera_zoom = false
  93. [node name="ParallaxLayer" type="ParallaxLayer" parent="ParallaxBackground" index="0"]
  94. z_index = -1
  95. motion_scale = Vector2( 0.5, 0.5 )
  96. motion_offset = Vector2( 0, 0 )
  97. motion_mirroring = Vector2( 1100, 600 )
  98. _sections_unfolded = [ "Motion", "Transform", "Z Index" ]
  99. [node name="sky-1" type="Sprite" parent="ParallaxBackground/ParallaxLayer" index="0"]
  100. position = Vector2( 563.088, 307.363 )
  101. scale = Vector2( 0.75, 0.75 )
  102. z_index = -1
  103. texture = ExtResource( 4 )
  104. _sections_unfolded = [ "Transform", "Z Index" ]
  105. [connection signal="timeout" from="Player/Timer" to="Player" method="_on_Timer_timeout"]
  106. [connection signal="body_entered" from="renemy" to="renemy" method="_on_renemy_body_entered"]