Initial commit
This commit is contained in:
commit
1514fe991b
675 changed files with 6030 additions and 0 deletions
24
scripts/shadow.gd
Normal file
24
scripts/shadow.gd
Normal file
|
@ -0,0 +1,24 @@
|
|||
extends Character
|
||||
|
||||
class_name Shadow;
|
||||
|
||||
var loop_origin : Loop;
|
||||
var move_count := 0;
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
var player : Character = $"../Player";
|
||||
player.has_moved.connect(_on_player_move);
|
||||
|
||||
|
||||
func get_direction_input() -> Globals.Direction:
|
||||
var result := loop_origin.move_list[move_count]
|
||||
print(result);
|
||||
return result;
|
||||
|
||||
func _on_player_move(direction: Globals.Direction):
|
||||
print("MOOOOOOVE")
|
||||
if move(get_direction_input()):
|
||||
move_count += 1
|
||||
move_count %= loop_origin.move_list.size();
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue