diff options
Diffstat (limited to 'Ghost.gd')
| -rw-r--r-- | Ghost.gd | 27 |
1 files changed, 27 insertions, 0 deletions
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 |
