From b82c0a5765bd922d0575878c051d3e3955c2bd17 Mon Sep 17 00:00:00 2001 From: Sara Date: Sun, 26 Nov 2023 13:12:41 +0100 Subject: [PATCH] feat: added bias to player depth --- game/src/Player.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/game/src/Player.h b/game/src/Player.h index 14fb5d6..be0c642 100644 --- a/game/src/Player.h +++ b/game/src/Player.h @@ -25,6 +25,8 @@ typedef struct Player { Vector moveInput; int attackInput; + int facing; + Sprite* sprite; AnimationSprite* idle; @@ -55,7 +57,7 @@ RigidBody* PlayerGetRigidBody(Player* self); void PlayerOnCollision(Player* self, Collision collision); void PlayerOnOverlap(Player* self, Collider* other); -static long PlayerGetDepth(Player* self) { return -(int)(self->transform.position.y * 1000); } +static long PlayerGetDepth(Player* self) { return -10-(int)(self->transform.position.y * 1000); } impl_Drop_for(Player, DestroyPlayer