|
@@ -66,12 +66,14 @@ void IngameState::init()
|
|
|
_player.setType(Player::Tropical);
|
|
|
_player.setTexture(_context->assets->loadTexture("data/triangle/Tropical.png"));
|
|
|
}
|
|
|
- _player.setContext(_context);
|
|
|
- _player.setPosition(556.f, 2200.f);
|
|
|
|
|
|
_foreground.create("data/background/Foreground.jpg", "data/background/Foreground_normal.jpg", "data/background/75pxjitter03.png");
|
|
|
_context->foreground = &_foreground;
|
|
|
|
|
|
+ _player.setContext(_context);
|
|
|
+ _player.setPosition(_foreground.getPlayerPosition() + sf::Vector2f(_player.getTexture()->getSize() / 2u));
|
|
|
+ Echo::error(_player.getOrigin().x, ' ', _player.getOrigin().y);
|
|
|
+
|
|
|
_background.setTextureRect(sf::IntRect(0, 0, _foreground.getSize().x, _foreground.getSize().y));
|
|
|
_noshaders.setTextureRect(sf::IntRect(0, 0, _foreground.getSize().x, _foreground.getSize().y));
|
|
|
|
|
@@ -94,7 +96,7 @@ void IngameState::init()
|
|
|
_dotaSound.setBuffer(_context->assets->loadSound("data/audio/Victory.ogg"));
|
|
|
|
|
|
_wormhole.load(_context->assets->loadTexture("data/triangle/Wormhole.png"), _context->assets->loadTexture("data/triangle/Wormhole_light.png"));
|
|
|
- _wormhole.setPosition(_foreground.getWormholePosition());
|
|
|
+ _wormhole.setPosition(_foreground.getWormholePosition() + _wormhole.getOrigin());
|
|
|
|
|
|
sf::Vector2f starPosition;
|
|
|
while(_foreground.getStarPosition(starPosition))
|