add ooze movement
This commit is contained in:
24
src/NPCs/ooze.gd
Normal file
24
src/NPCs/ooze.gd
Normal file
@@ -0,0 +1,24 @@
|
||||
extends KinematicBody2D
|
||||
|
||||
|
||||
# Declare member variables here. Examples:
|
||||
# var a = 2
|
||||
# var b = "text"
|
||||
|
||||
const MOVEMENT_VECTORS = [
|
||||
Vector2.UP,
|
||||
Vector2.RIGHT,
|
||||
Vector2.DOWN,
|
||||
Vector2.LEFT
|
||||
]
|
||||
|
||||
# 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 _physics_process(delta):
|
||||
var movement = MOVEMENT_VECTORS[randi() % 4]
|
||||
move_and_collide(movement * 2)
|
||||
pass
|
Reference in New Issue
Block a user