add color nicknames
parent
5ad78dfe70
commit
07cab50b6e
|
@ -211,7 +211,7 @@ void Shooter::drawStatsTable() {
|
|||
for (auto &p : allPlayers) {
|
||||
screen->drawText(std::to_string(i) + "\t" + p->playerNickName() + "\t" + std::to_string(p->kills()) + " / " +
|
||||
std::to_string(p->deaths()),
|
||||
Vec2D{10, 15 + 35.0 * i}, 25, sf::Color(0, 0, 0, 150));
|
||||
Vec2D{10, 15 + 35.0 * i}, 25, p->color());
|
||||
i++;
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ Player::Player(ObjectNameTag name, const std::string &filename, const Vec3D &sca
|
|||
setAcceleration(Vec3D{0, -ShooterConsts::GRAVITY, 0});
|
||||
setCollision(true);
|
||||
setVisible(false);
|
||||
setColor(sf::Color(0,0,0));
|
||||
|
||||
setCollisionCallBack([this](const ObjectNameTag &tag, std::shared_ptr<RigidBody> obj) { collisionWithObject(tag, obj); });
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue