mirror of
https://github.com/dylanbenzi/pacmen-sfml.git
synced 2026-11-27 08:26:59 +00:00
modify entire game to use class based structure
This commit is contained in:
+2
-3
@@ -1,7 +1,6 @@
|
||||
#ifndef ENTITY_H
|
||||
#define ENTITY_H
|
||||
|
||||
#include "TileMap.h"
|
||||
#include <SFML/Graphics/Drawable.hpp>
|
||||
#include <SFML/Graphics/PrimitiveType.hpp>
|
||||
#include <SFML/Graphics/Rect.hpp>
|
||||
@@ -23,13 +22,13 @@ enum class MovementDir {
|
||||
|
||||
class Entity : public sf::Drawable, public sf::Transformable {
|
||||
public:
|
||||
Entity(TileMap& map) : map(map) {};
|
||||
//Entity(TileMap& map) : map(map) {};
|
||||
|
||||
bool loadTexture(const std::filesystem::path& texturePath, sf::Vector2u graphicTileSize, int tiles);
|
||||
|
||||
void setTextureFrame(const sf::IntRect& rectangle);
|
||||
protected:
|
||||
TileMap map;
|
||||
//TileMap map;
|
||||
|
||||
sf::VertexArray vertexArray;
|
||||
sf::Texture texture;
|
||||
|
||||
Reference in New Issue
Block a user