forked from NaiJi/project-kyoku
Finish brief version of new project design
parent
e5969d1484
commit
ed300edcf6
@ -1,12 +0,0 @@
|
|||||||
#include "classicarrow.h"
|
|
||||||
|
|
||||||
ClassicArrow::ClassicArrow()
|
|
||||||
{}
|
|
||||||
|
|
||||||
ClassicArrow::~ClassicArrow()
|
|
||||||
{}
|
|
||||||
|
|
||||||
void ClassicArrow::update()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
@ -1,40 +0,0 @@
|
|||||||
#ifndef CLASSICARROW_H
|
|
||||||
#define CLASSICARROW_H
|
|
||||||
|
|
||||||
#include "notegraphicsentity.h"
|
|
||||||
|
|
||||||
#include <SFML/Graphics/RectangleShape.hpp>
|
|
||||||
|
|
||||||
class ClassicArrow : public NoteGraphicsEntity
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
|
|
||||||
enum class Type
|
|
||||||
{
|
|
||||||
ARROW_UP,
|
|
||||||
ARROW_RIGHT,
|
|
||||||
ARROW_DOWN,
|
|
||||||
ARROW_LEFT
|
|
||||||
};
|
|
||||||
|
|
||||||
explicit ClassicArrow();
|
|
||||||
virtual ~ClassicArrow() override;
|
|
||||||
|
|
||||||
virtual void update() override;
|
|
||||||
|
|
||||||
virtual void onKeyPressed() override;
|
|
||||||
virtual void onKeyReleased() override;
|
|
||||||
|
|
||||||
virtual void show() override;
|
|
||||||
virtual void killAsExpired() override;
|
|
||||||
virtual void reset() override;
|
|
||||||
|
|
||||||
virtual bool isActive() const override;
|
|
||||||
|
|
||||||
private:
|
|
||||||
sf::RectangleShape static_sprite;
|
|
||||||
sf::RectangleShape trail_sprite;
|
|
||||||
sf::VertexArray trail_vertex;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // CLASSICARROW_H
|
|
@ -0,0 +1,16 @@
|
|||||||
|
#include "classicsprite.h"
|
||||||
|
#include <SFML/Graphics/RenderTarget.hpp>
|
||||||
|
|
||||||
|
ClassicSprite::ClassicSprite(const sf::RectangleShape& shape) :
|
||||||
|
_shape(shape)
|
||||||
|
{}
|
||||||
|
|
||||||
|
void ClassicSprite::draw(sf::RenderTarget& target, sf::RenderStates states) const
|
||||||
|
{
|
||||||
|
target.draw(_shape, states);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ClassicSprite::setCoordinates(float x, float y) noexcept
|
||||||
|
{
|
||||||
|
_shape.setPosition(x, y);
|
||||||
|
}
|
@ -0,0 +1,16 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "sprite.h"
|
||||||
|
#include "SFML/Graphics/RectangleShape.hpp"
|
||||||
|
|
||||||
|
class ClassicSprite : public Sprite, public sf::Drawable
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ClassicSprite(const sf::RectangleShape& shape);
|
||||||
|
virtual void draw(sf::RenderTarget& target, sf::RenderStates states) const override;
|
||||||
|
|
||||||
|
void setCoordinates(float x, float y) noexcept;
|
||||||
|
|
||||||
|
private:
|
||||||
|
sf::RectangleShape _shape;
|
||||||
|
};
|
Loading…
Reference in New Issue