Skip to content

Commit

Permalink
correcting animated entity animations (when moving)
Browse files Browse the repository at this point in the history
  • Loading branch information
Loodoor committed Apr 1, 2017
1 parent cf4b551 commit d0bfa7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/entities/animatedentity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ AnimatedEntity::AnimatedEntity(int x, int y) :
, anim_cursor(MvState::idle)
, direction(DIRECTION::down)
, speed(1.0f / 32.0f)
, frame_time(sf::seconds(0.2f))
, frame_time(sf::seconds(0.035f))
{
}

Expand Down Expand Up @@ -142,7 +142,7 @@ int AnimatedEntity::move(DIRECTION dir, Map& map_, sf::Time elapsed)
this->not_moving_time = sf::seconds(0.0f); // reset it
this->update_anim(elapsed);

float speed = (this->speed * TILE_SIZE * 4.0f); // * (elapsed.asSeconds() * 100.0f);
float speed = (this->speed * TILE_SIZE * 4.0f);
sf::Vector2u csprite_size = (this->getCurrentSprite().getTexture())->getSize();

std::vector<float> vect {0, 0};
Expand Down
2 changes: 1 addition & 1 deletion src/views/save.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ bool SaveView::load()
return false;

this->text.setFont(this->font);
this->text.setColor(sf::Color::Black);
this->text.setFillColor(sf::Color::Black);
this->text.setCharacterSize(24);
this->text.setString("Clic pour sauvegarder ta partie !");
this->text.setPosition((WIN_W - this->text.getGlobalBounds().width) / 2, 275.0f);
Expand Down

0 comments on commit d0bfa7d

Please sign in to comment.