16 lines
283 B
GDScript3
16 lines
283 B
GDScript3
|
|
extends Sprite2D
|
||
|
|
|
||
|
|
var speed: float = 50.0
|
||
|
|
var rotationSpeed: float = PI/8
|
||
|
|
|
||
|
|
func _process(delta: float) -> void:
|
||
|
|
if position.y > 600:
|
||
|
|
queue_free()
|
||
|
|
position.y += delta * speed
|
||
|
|
rotation +=delta * rotationSpeed
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
func _on_area_2d_area_entered(_area: Area2D) -> void:
|
||
|
|
queue_free()
|