first half of the squig

This commit is contained in:
Haze Weathers 2023-05-20 21:25:09 -04:00
parent afa641901c
commit b4b7577479
5 changed files with 169 additions and 2 deletions

13
objects/enemy/squig.gd Normal file
View file

@ -0,0 +1,13 @@
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