summaryrefslogtreecommitdiffstats
path: root/player.gd
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-11-14 14:05:22 +0200
committerJan Tuomi <jan@jantuomi.fi>2025-11-14 14:05:22 +0200
commit9d71ad993ec77108874db9697256b4fef385ce16 (patch)
tree72bd20d86c7f1e5b8e3c433f98d138eaae06e43a /player.gd
parentc80c35213bb13ca7db939639d5a707f6944f8196 (diff)
Add camera offsetting when moving
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: