Disabled key repeat (not needed).
This commit is contained in:
parent
4b222e9c7a
commit
07826336c5
1 changed files with 4 additions and 3 deletions
|
@ -25,19 +25,20 @@ Game::Game(sf::RenderWindow& window) :
|
||||||
mQuit(false),
|
mQuit(false),
|
||||||
mPaused(false) {
|
mPaused(false) {
|
||||||
mWindow.setFramerateLimit(FPS_GOAL);
|
mWindow.setFramerateLimit(FPS_GOAL);
|
||||||
mWindow.setKeyRepeatEnabled(true);
|
mWindow.setKeyRepeatEnabled(false);
|
||||||
|
|
||||||
sf::IntRect area(-32, -32, 64, 64);
|
sf::IntRect area(-32, -32, 64, 64);
|
||||||
mGenerator.generateTiles(area);
|
mGenerator.generateTiles(area);
|
||||||
mPlayer = std::shared_ptr<Player>(new Player(mWorld, mPathfinder,
|
mPlayer = std::shared_ptr<Player>(new Player(mWorld, mPathfinder,
|
||||||
mGenerator.getPlayerSpawn()));
|
mGenerator.getPlayerSpawn()));
|
||||||
mWorld.insertCharacter(mPlayer);
|
mWorld.insertCharacter(mPlayer);
|
||||||
|
/*
|
||||||
auto enemyPositions = mGenerator.getEnemySpawns(area);
|
auto enemyPositions = mGenerator.getEnemySpawns(area);
|
||||||
for (const auto& position : enemyPositions) {
|
for (const auto& position : enemyPositions) {
|
||||||
if (thor::length(mPlayer->getPosition() - position) > Character::VISION_DISTANCE)
|
if (thor::length(mPlayer->getPosition() - position) > Character::VISION_DISTANCE)
|
||||||
mWorld.insertCharacter(std::shared_ptr<Enemy>(new Enemy(mWorld, mPathfinder, position)));
|
mWorld.insertCharacter(std::shared_ptr<Enemy>(new Enemy(mWorld, mPathfinder, position)));
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Reference in a new issue