From 32528712befef39670f2ef30974e33fa291cebe3 Mon Sep 17 00:00:00 2001 From: arngo <27396817+arngo@users.noreply.github.com> Date: Wed, 20 Jan 2021 18:30:48 -0500 Subject: implemented basic platforming controls and physics as well as ghosts --- Ghost.gd | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Ghost.gd (limited to 'Ghost.gd') diff --git a/Ghost.gd b/Ghost.gd new file mode 100644 index 0000000..faee8f3 --- /dev/null +++ b/Ghost.gd @@ -0,0 +1,27 @@ +extends KinematicBody2D + + +var position_record +var position_num = 0 + + +func initialize(position_record): + self.position_record = position_record + + +# Called when the node enters the scene tree for the first time. +func _ready(): + pass # Replace with function body. + + +func _physics_process(delta): + if position_num < position_record.size(): + position = position_record[position_num] + position_num += 1 + else: + queue_free() + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +#func _process(delta): +# pass -- cgit v1.2.3