degats dans bullet
This commit is contained in:
@@ -206,15 +206,20 @@ void Player::Teleport(int& x, int& z) {
|
||||
m_position.x -= x * CHUNK_SIZE_X;
|
||||
m_position.z -= z * CHUNK_SIZE_Z;
|
||||
}
|
||||
bool Player::AmIDead()
|
||||
{
|
||||
return m_hp <= 0;
|
||||
}
|
||||
|
||||
void Player::InflictDamage(Player playerHit, float hitPoints)
|
||||
|
||||
void Player::InflictDamage(float hitPoints)
|
||||
{
|
||||
|
||||
playerHit.m_hp -= hitPoints;
|
||||
m_hp -= hitPoints;
|
||||
|
||||
|
||||
if (playerHit.GetHP() <= 0)
|
||||
{ // Quand l'autre joueur est mort.
|
||||
if (AmIDead())
|
||||
{ // Quand le joueur est mort.
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user