If player is dead, don't spawn it
This commit is contained in:
@@ -93,8 +93,13 @@ void Player::Kill(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Player::Spawn(int pos){
|
void Player::Spawn(int pos){
|
||||||
captured = false;
|
if (_lives <= 0) {
|
||||||
moveto(pos);
|
// Serial.printf("Player %d has no life. Not Spawning\n", _id);
|
||||||
|
captured = true;
|
||||||
|
} else {
|
||||||
|
captured = false;
|
||||||
|
moveto(pos);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int Player::Lives() const{
|
int Player::Lives() const{
|
||||||
|
|||||||
Reference in New Issue
Block a user