From 9d71ad993ec77108874db9697256b4fef385ce16 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Fri, 14 Nov 2025 14:05:22 +0200 Subject: Add camera offsetting when moving --- player.gd | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'player.gd') 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: -- cgit v1.3