summaryrefslogtreecommitdiffstats
path: root/player.gd
diff options
context:
space:
mode:
Diffstat (limited to 'player.gd')
-rw-r--r--player.gd6
1 files changed, 6 insertions, 0 deletions
diff --git a/player.gd b/player.gd
index fd5465a..bda8616 100644
--- a/player.gd
+++ b/player.gd
@@ -17,6 +17,12 @@ var coyote: int = 0
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
+
+func get_facing() -> int:
+ if $AnimatedSprite2D.flip_h:
+ return -1
+ else:
+ return 1
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta: float) -> void: