Start implementing multitouch

This commit is contained in:
NaiJi ✨ 2021-07-14 19:24:47 +04:00
parent 77a9d15caa
commit 206ad5c84a
2 changed files with 19 additions and 8 deletions

View File

@ -35,7 +35,9 @@ void ClassicNote::putToGame(const microsec &music_offset)
bool ClassicNote::isInGame() const
{
return _state == State::FLYING || _state == State::ACTIVE || _state == State::DYING;
return _state == State::FLYING
|| _state == State::ACTIVE
|| _state == State::DYING;
}
bool ClassicNote::isExpired() const

View File

@ -52,15 +52,24 @@ public:
const Coordinates& getCoordinates() const noexcept;
private:
const Coordinates _coordinates;
const PrecisionEvaluator<Grade> _evaluator;
const std::array<const sf::Keyboard::Key, 2> _keys;
const std::unique_ptr<ClassicGraphicsManager>& _graphics_manager;
struct NoteElement
{
std::shared_ptr<ClassicSprite> _sprite;
std::array<std::shared_ptr<ClassicAnimationScenario>, 5> _animations;
const std::array<const sf::Keyboard::Key, 2> _keys;
const Coordinates _coordinates;
const Type _type;
bool pressed = false;
sf::Keyboard::Key pressed_as;
};
std::vector<NoteElement> _elements;
const PrecisionEvaluator<Grade> _evaluator;
const std::unique_ptr<ClassicGraphicsManager>& _graphics_manager;
State _state;
std::array<std::shared_ptr<ClassicAnimationScenario>, 5> _animations;
};