13 lines
305 B
GDScript
13 lines
305 B
GDScript
extends "res://objects/enemy/enemy.gd"
|
|
|
|
export var speed: float = 50.0
|
|
export var damping: float = 0.9
|
|
|
|
var velocity: Vector2 = Vector2.ZERO
|
|
|
|
func _physics_process(delta: float) -> void:
|
|
velocity.y *= pow(damping, delta)
|
|
global_position += velocity * delta
|
|
|
|
func _propel() -> void:
|
|
velocity.y = -speed
|