feat: added bias to player depth
This commit is contained in:
parent
94cc7e8c6c
commit
b82c0a5765
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue