VEGO-Engine  0.1
Loading...
Searching...
No Matches
TileComponent.h
1#pragma once
2
3#include <SDL.h>
4#include <string>
5#include <map>
6
7#include "Component.h"
8
11
13{
14public:
15 TransformComponent* transform;
16 SpriteComponent* sprite;
17
18 SDL_Rect tileRect;
19 int tileID;
20 const char* path;
21
22 TileComponent() = default;
23 TileComponent(int x, int y, int w, int h, int id, const std::map<int, std::pair<std::string, bool>>* textureDict);
24 ~TileComponent() = default;
25
26 void init() override;
27
28 bool hasCollision(){return this->collision;}
29 std::string getName(){return this->tileName;}
30private:
31 bool collision;
32 std::string tileName;
33};
Definition Component.h:6
Definition SpriteComponent.h:16
Definition TileComponent.h:13
Definition TransformComponent.h:8