diff options
| author | arngo <[email protected]> | 2021-01-20 18:30:48 -0500 |
|---|---|---|
| committer | arngo <[email protected]> | 2021-01-20 18:30:48 -0500 |
| commit | 32528712befef39670f2ef30974e33fa291cebe3 (patch) | |
| tree | 8e8aa13520fd0fc55c18884f138080a3191ec5c8 /Ghost.gd | |
| parent | 1f69f893502a03dd8cc8d7961354f528239bd82b (diff) | |
| download | E-C-Kai-32528712befef39670f2ef30974e33fa291cebe3.tar.gz E-C-Kai-32528712befef39670f2ef30974e33fa291cebe3.zip | |
implemented basic platforming controls and physics as well as ghosts
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 |
