VEGO-Engine
0.1
Loading...
Searching...
No Matches
TileComponent.h
1
#pragma once
2
3
#include <SDL3/SDL.h>
4
#include <string>
5
#include <map>
6
7
#include "Component.h"
8
#include "Textures.h"
9
10
class
SpriteComponent
;
11
class
TransformComponent
;
12
13
class
TileComponent :
public
Component
14
{
15
public
:
16
TransformComponent
* transform;
17
SpriteComponent
* sprite;
18
19
SDL_Rect tileRect;
20
int
tileID;
21
Textures
texture;
22
23
TileComponent() =
default
;
24
TileComponent(
int
x,
int
y,
int
w,
int
h,
int
id
,
const
std::map<
int
, std::pair<Textures, bool>>* textureDict);
25
~TileComponent() =
default
;
26
27
void
init()
override
;
28
29
bool
hasCollision() {
30
return
this->collision;
31
}
32
33
34
private
:
35
bool
collision;
36
};
Component
Definition
Component.h:8
SpriteComponent
Definition
SpriteComponent.h:17
Textures
Forward declaration of the Textures enum class.
TransformComponent
Definition
TransformComponent.h:9
include
TileComponent.h
Generated by
1.13.2