Début NoteSprite
This commit is contained in:
parent
6e6cfc347d
commit
611ff37653
7 changed files with 47 additions and 3 deletions
19
SimpleGame/src/Include/NoteSprite.hpp
Normal file
19
SimpleGame/src/Include/NoteSprite.hpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
|
||||
#include <SFML/Graphics/Sprite.hpp>
|
||||
#include <SFML/System/Vector2.hpp>
|
||||
class NoteTile;
|
||||
|
||||
// Should just be a component of NoteTile
|
||||
class NoteSprite {
|
||||
public:
|
||||
static sf::Texture texture;
|
||||
friend class NoteTile;
|
||||
|
||||
private:
|
||||
sf::Sprite sprite;
|
||||
float fall_speed;
|
||||
NoteSprite();
|
||||
NoteSprite(sf::Vector2f start_pos, float fall_speed);
|
||||
void update(float dtime);
|
||||
};
|
|
@ -1,4 +1,5 @@
|
|||
#include <NotePlaceEnum.hpp>
|
||||
#include <NoteSprite.hpp>
|
||||
#include <SFML/Graphics/StencilMode.hpp>
|
||||
#include <SFML/System/Vector2.hpp>
|
||||
#include <memory>
|
||||
|
@ -12,10 +13,10 @@ private:
|
|||
float good_interval;
|
||||
NotePlaceEnum place;
|
||||
// used for Graphics
|
||||
sf::Vector2f position;
|
||||
NoteSprite note_sprite;
|
||||
// probably some tileSprite class here in the future <-
|
||||
|
||||
// Constructor private, use create to create
|
||||
// Constructor is rivate, use create
|
||||
NoteTile(float play_time, float good_interval, NotePlaceEnum place);
|
||||
|
||||
public:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue