15 lines
289 B
GDScript
15 lines
289 B
GDScript
extends Node2D
|
|
|
|
var speed = 100
|
|
var base_speed = 10
|
|
var direction = 0
|
|
|
|
var damage
|
|
var hostile = false
|
|
|
|
func _physics_process(delta: float) -> void:
|
|
position += speed*delta*base_speed*direction
|
|
|
|
if position.x < 0 or position.x > 256 or position.y < 0 or position.y > 256:
|
|
queue_free()
|