RType
include
maintestdisplay.hpp
Go to the documentation of this file.
1
#
ifndef
MAINTESTDISPLAY_HPP
2
#
define
MAINTESTDISPLAY_HPP
3
4
#
include
<
SFML
/
Graphics
.
hpp
>
5
#
include
<
iostream
>
6
7
class
Sprite
8
{
9
public
:
10
Sprite
(std::string path,
int
animationLimit = 0);
11
~
Sprite
() =
default
;
12
void
animateSprite
(
int
frameCount,
int
frameToBegin,
int
numberFrameToAnim,
float
switchTime,
int
top,
int
bottom,
13
sf::Clock clock, sf::RenderWindow &window);
14
void
drawSprite
(sf::RenderWindow &window)
15
{
16
window.draw(_Sprite);
17
};
18
int
getSizeY
()
19
{
20
return
_Texture.getSize().y;
21
};
22
int
getSizeX
()
23
{
24
return
_Texture.getSize().x;
25
};
26
27
sf
::
Sprite
_Sprite
;
28
sf
::
Texture
_Texture
;
29
30
protected
:
31
int
_AnimationLimit
;
32
int
_NumberAnimation
;
33
bool
_EndAnimation
;
34
};
35
36
#
endif
// MAINTESTDISPLAY_HPP
Generated by
1.9.1