My Project
Client
Source
Managers
AssetManager
Asset.hpp
1
/*
2
** EPITECH PROJECT, 2022
3
** B-CPP-500-PAR-5-1-rtype-martin.vanaud
4
** File description:
5
** Asset
6
*/
7
8
#ifndef ASSET_HPP_
9
#define ASSET_HPP_
10
11
#include <nlohmann/json.hpp>
12
13
#include "MyTexture.hpp"
14
15
/* Component */
16
#include "Component/CRect.hpp"
17
21
class
Asset
{
22
public
:
28
Asset
(nlohmann::json
const
&jsonData);
29
33
~Asset
() {};
34
40
MyTexture
&
getTexture
();
41
47
float
getScale
()
const
;
48
54
component::crect_t
getRectangle
()
const
;
55
61
std::size_t
getNbFrames
()
const
;
62
63
protected
:
64
private
:
65
MyTexture
_texture;
66
float
_scale;
67
component::crect_t
_rectangle;
68
};
69
70
#endif
/* !ASSET_HPP_ */
Asset::getTexture
MyTexture & getTexture()
Get the Texture object.
Definition:
Asset.cpp:24
MyTexture
MyTexture class.
Definition:
MyTexture.hpp:19
Asset::getRectangle
component::crect_t getRectangle() const
Get the Rectangle object.
Definition:
Asset.cpp:34
component::crect_t
A structure representing the rectangle component that holds the rectangle of an entity.
Definition:
CRect.hpp:18
Asset
Class containing all elements of an Asset.
Definition:
Asset.hpp:21
Asset::getNbFrames
std::size_t getNbFrames() const
Get the Nb Frames object.
Definition:
Asset.cpp:39
Asset::Asset
Asset(nlohmann::json const &jsonData)
Construct a new Asset object.
Definition:
Asset.cpp:13
Asset::getScale
float getScale() const
Get the Scale object.
Definition:
Asset.cpp:29
Asset::~Asset
~Asset()
Destroy the Asset object.
Definition:
Asset.hpp:33
Generated by
1.8.17