mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-07-06 08:23:07 +02:00
Adding loadTextures to world and paths to textures to constants
This commit is contained in:
parent
0bbdbbb221
commit
64ee34b8f3
@ -14,6 +14,7 @@ namespace Textures // This gives us a scope for the enumerators which allows us
|
||||
{
|
||||
Eagle,
|
||||
Raptor,
|
||||
Desert
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -19,9 +19,16 @@ World::World(sf::RenderWindow& window)
|
||||
, mScrollSpeed ( WORLD_SCROLL_SPEED )
|
||||
, mPlayerAircraft(nullptr)
|
||||
{
|
||||
// loadTextures();
|
||||
loadTextures();
|
||||
// buildScene();
|
||||
// mWorldView.setCenter(mSpawnPosition);
|
||||
}
|
||||
|
||||
void World::loadTextures()
|
||||
{
|
||||
mTextures.load(Textures::Eagle, PATH_TO_EAGLE_TEXTURE);
|
||||
mTextures.load(Textures::Raptor, PATH_TO_RAPTOR_TEXTURE);
|
||||
mTextures.load(Textures::Desert, PATH_TO_DESERT_TEXTURE);
|
||||
}
|
||||
|
||||
#endif // WORLD_CPP
|
||||
|
||||
Binary file not shown.
@ -5,6 +5,9 @@
|
||||
|
||||
// Paths
|
||||
const std::string PATH_TO_PLAYER_TEXTURE = "Textures/Player.png";
|
||||
const std::string PATH_TO_EAGLE_TEXTURE = "Textures/Eagle.png";
|
||||
const std::string PATH_TO_RAPTOR_TEXTURE = "Textures/Raptor.png";
|
||||
const std::string PATH_TO_DESERT_TEXTURE = "Textures/Desert.png";
|
||||
|
||||
// Player constants
|
||||
const float PLAYER_RADIUS = 40;
|
||||
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user