mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-06-12 05:10:37 +00:00
use size_t instead og static cast
This commit is contained in:
@@ -58,7 +58,7 @@ namespace BBM
|
||||
scene->addEntity("scene title text")
|
||||
.addComponent<PositionComponent>(1920 / 2.37, 250, 0)
|
||||
.addComponent<Drawable2DComponent, RAY2D::Text>("CONGRATS", 50, RAY::Vector2(), ORANGE);
|
||||
for (int i = 0; i < static_cast<int>(players.size()); i++) {
|
||||
for (size_t i = 0; i < players.size(); i++) {
|
||||
scene->addEntity("player tile")
|
||||
.addComponent<PositionComponent>(224 * (i + 1) + 200 * i, 1080 / 2.5, 0)
|
||||
.addComponent<Drawable2DComponent, RAY2D::Rectangle>(RAY::Vector2(224 * (i + 1) + 200 * i, 1080 / 3),
|
||||
|
||||
@@ -53,8 +53,8 @@ namespace BBM
|
||||
introAnimation(entity, true);
|
||||
if (playerPos.size() == 1)
|
||||
newCameraPos = playerPos[0];
|
||||
for (int i = 0; i < static_cast<int>(playerPos.size()); i++)
|
||||
for (int j = 0; j < static_cast<int>(playerPos.size()); j++) {
|
||||
for (size_t i = 0; i < playerPos.size(); i++)
|
||||
for (size_t j = 0; j < playerPos.size(); j++) {
|
||||
if (maxDist < playerPos[i].distance(playerPos[j])) {
|
||||
maxDist = playerPos[i].distance(playerPos[j]);
|
||||
newCameraPos = (playerPos[i] + playerPos[j]) / 2;
|
||||
|
||||
Reference in New Issue
Block a user