Skip to content

Commit

Permalink
adjust hitbox size
Browse files Browse the repository at this point in the history
  • Loading branch information
David Arutiunian committed Jan 11, 2018
1 parent 2fc1fca commit 5e09819
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ bool Engine::intersect(const std::shared_ptr<IEntity> &p_entity)
const sf::Vector2f &doodlerPosition = m_p_doodler->getPosition();
const sf::Vector2f &platformSize = p_entity->getSize();
const sf::Vector2f &platformPosition = p_entity->getPosition();
const sf::Vector2f &offset = sf::Vector2f({doodlerSize.x * 0.25f, 0});
const sf::Vector2f &offset = sf::Vector2f({doodlerSize.x * 0.35f, 0});

sf::FloatRect rhs(platformPosition - platformSize * 0.5f, platformSize);
sf::FloatRect lhs;
Expand Down
2 changes: 0 additions & 2 deletions src/Platform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ void Platform::setRandomBonusSprites()
}
if (rand() % 3 > 0)
{
m_size = PLATFORM_SPRING_SPRITE_SIZE;
m_type = EType::PLATFORM_BONUS_SPRING;
m_p_sprite = std::make_unique<Sprite>(Sprite({
Assets::PLATFORM_SPRING.length,
Expand All @@ -35,7 +34,6 @@ void Platform::setRandomBonusSprites()
}));
} else
{
m_size = PLATFORM_TRAMPOLINE_SPRITE_SIZE;
m_type = EType::PLATFORM_BONUS_TRAMPOLINE;
m_p_sprite = std::make_unique<Sprite>(Sprite({
Assets::PLATFORM_TRAMPOLINE.length,
Expand Down

0 comments on commit 5e09819

Please sign in to comment.