first
This commit is contained in:
15
scene/minigames/steering/astroid.gd
Normal file
15
scene/minigames/steering/astroid.gd
Normal file
@@ -0,0 +1,15 @@
|
||||
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()
|
||||
Reference in New Issue
Block a user