sun.gd 501 B

1234567891011121314151617181920
  1. extends Polygon2D
  2. onready var MAIN = find_parent("MAIN")
  3. # Declare member variables here. Examples:
  4. # var a: int = 2
  5. # var b: String = "text"
  6. func _process(delta: float) -> void:
  7. position.x += MAIN.speed * delta
  8. if position.x <= -200:
  9. queue_free()
  10. # Called when the node enters the scene tree for the first time.
  11. func _ready() -> void:
  12. pass # Replace with function body.
  13. # Called every frame. 'delta' is the elapsed time since the previous frame.
  14. #func _process(delta: float) -> void:
  15. # pass