hyper space
This commit is contained in:
19
enemy_bullet/enemy_bullet.gd
Normal file
19
enemy_bullet/enemy_bullet.gd
Normal file
@@ -0,0 +1,19 @@
|
||||
extends Area2D
|
||||
|
||||
@export var speed = 150
|
||||
|
||||
func start(pos):
|
||||
position = pos
|
||||
|
||||
func _process(delta):
|
||||
position.y += speed * delta
|
||||
|
||||
|
||||
func _on_visible_on_screen_notifier_2d_screen_exited():
|
||||
queue_free() # Replace with function body.
|
||||
|
||||
|
||||
func _on_area_entered(area):
|
||||
if area.name == "Player":
|
||||
queue_free()
|
||||
area.shield -= 1
|
||||
Reference in New Issue
Block a user