Derniers ajustements
This commit is contained in:
parent
33bda6381d
commit
d68f697e59
2 changed files with 17 additions and 10 deletions
|
@ -12,13 +12,16 @@ NoteTile::NoteTile(float play_time, float good_interval, NotePlaceEnum place,
|
|||
float current_time)
|
||||
: play_time(play_time), good_interval(good_interval), place(place),
|
||||
note_sprite() {
|
||||
// TODO do real note_sprite init, make it fall at good speed far enough...
|
||||
note_sprite.fall_speed = 500;
|
||||
note_sprite.sprite.setPosition(sf::Vector2f(
|
||||
NOTE_PLACE_X_POS[place],
|
||||
NOTE_PRESS_HEIGHT - note_sprite.fall_speed * (play_time - current_time)));
|
||||
|
||||
float s = FLOWER_SIZE / note_sprite.sprite.getTexture().getSize().x;
|
||||
sf::Vector2u sprite_size = note_sprite.sprite.getTexture().getSize();
|
||||
note_sprite.sprite.setOrigin(
|
||||
sf::Vector2f(sprite_size.x / 2, sprite_size.y / 2));
|
||||
|
||||
float s = FLOWER_SIZE / sprite_size.x;
|
||||
note_sprite.sprite.setScale(sf::Vector2f(s, s));
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue