feat(game): player and prop now implement get depth for behaviour entity
This commit is contained in:
parent
966f7b9efe
commit
1bba6c86f1
|
@ -56,6 +56,8 @@ Shape* PlayerGetCollisionShape(Player* self);
|
|||
void PlayerOnCollision(Player* self, Collision collision);
|
||||
void PlayerOnOverlap(Player* self, PhysicsEntity other);
|
||||
|
||||
static long PlayerGetDepth(Player* self) { return -(int)(self->transform.position.y * 1000); }
|
||||
|
||||
impl_Drop_for(Player,
|
||||
DestroyPlayer
|
||||
)
|
||||
|
@ -63,7 +65,8 @@ impl_Drop_for(Player,
|
|||
impl_BehaviourEntity_for(Player,
|
||||
PlayerStart,
|
||||
PlayerUpdate,
|
||||
PlayerDraw
|
||||
PlayerDraw,
|
||||
PlayerGetDepth
|
||||
)
|
||||
|
||||
impl_Transformable_for(Player,
|
||||
|
|
|
@ -32,6 +32,8 @@ Transform* PropGetTransform(Prop* self);
|
|||
RigidBody* PropGetRigidBody(Prop* self);
|
||||
Shape* PropGetCollisionShape(Prop* self);
|
||||
|
||||
static long PropGetDepth(Prop* self) { return -(int)(self->transform.position.y * 1000); }
|
||||
|
||||
impl_Transformable_for(Prop,
|
||||
PropGetTransform
|
||||
)
|
||||
|
@ -50,7 +52,8 @@ impl_Drop_for(Prop,
|
|||
impl_BehaviourEntity_for(Prop,
|
||||
PropStart,
|
||||
PropUpdate,
|
||||
PropDraw
|
||||
PropDraw,
|
||||
PropGetDepth
|
||||
)
|
||||
|
||||
#endif // !FIGHT_PROP_H
|
||||
|
|
Loading…
Reference in a new issue