Visuel notes
This commit is contained in:
parent
e2fb0d911a
commit
05f8b11dec
14 changed files with 137 additions and 50 deletions
|
@ -1,7 +1,9 @@
|
|||
#include <NotePlaceEnum.hpp>
|
||||
#include <NoteSprite.hpp>
|
||||
#include <SFML/Graphics/RenderWindow.hpp>
|
||||
#include <SFML/Graphics/StencilMode.hpp>
|
||||
#include <SFML/System/Vector2.hpp>
|
||||
#include <SFML/Window/Window.hpp>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
|
@ -16,21 +18,25 @@ private:
|
|||
NoteSprite note_sprite;
|
||||
// probably some tileSprite class here in the future <-
|
||||
|
||||
// Constructor is rivate, use create
|
||||
NoteTile(float play_time, float good_interval, NotePlaceEnum place);
|
||||
// Constructor is private, use create
|
||||
NoteTile(float play_time, float good_interval, NotePlaceEnum place,
|
||||
float current_time);
|
||||
|
||||
// For unit testing
|
||||
|
||||
public:
|
||||
// Good key press for this note, is if player press good place, within
|
||||
// [play_time - good_interval/2, play_time + good_interval/2]
|
||||
static void create(float play_time, float good_interval, NotePlaceEnum place);
|
||||
static void create(float play_time, float good_interval, NotePlaceEnum place,
|
||||
float current_time);
|
||||
// Usefull in test, but don't use it anywhere
|
||||
static void clear() { existing_tiles.clear(); };
|
||||
// Should be called when one of arrows key pressed, return True if it's a good
|
||||
// press
|
||||
static bool checkPress(float press_time, NotePlaceEnum key_pressed);
|
||||
|
||||
static void update(float dtime, sf::RenderWindow &window);
|
||||
|
||||
// Some getters usefull in test :
|
||||
float getPlayTime() const { return play_time; };
|
||||
float getGoodInterval() const { return good_interval; };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue