2024-01-29 01:52:01 +01:00
|
|
|
extends Area2D
|
|
|
|
var velocity: Vector2 = Vector2()
|
|
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
|
|
func _ready():
|
|
|
|
pass # Replace with function body.
|
|
|
|
|
|
|
|
|
|
|
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
|
|
|
func _process(delta):
|
|
|
|
pass
|
|
|
|
|
|
|
|
func _physics_process(delta):
|
|
|
|
position += velocity * delta
|
|
|
|
|
|
|
|
|
|
|
|
func _on_body_entered(body):
|
|
|
|
#if body.is_in_group("players"):
|
|
|
|
# Global.live = 2
|
|
|
|
#elif body.is_in_group("enemies"):
|
|
|
|
# Global.live = 3
|
2024-01-29 01:57:21 +01:00
|
|
|
#elif body.is_in_group("boss"):
|
|
|
|
# Global.live = 3
|
2024-01-29 01:52:01 +01:00
|
|
|
queue_free()
|
|
|
|
|
|
|
|
|
|
|
|
func _on_screen_exited():
|
|
|
|
queue_free()
|