Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F625602
character.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
character.h
View Options
#ifndef CHARACTER_H
#define CHARACTER_H
#include
<random>
#include
<iostream>
#include
"data.h"
#include
"textureholder.h"
#include
"animatedsprite.h"
#include
"tilemap.h"
#include
"elem.h"
/*!
* \brief The Character class
*/
class
Character
:
public
Elem
{
public
:
Character
(
TextureHolder
*
textures
,
int
playerNumber
);
TextureHolder
*
textures
;
Animation
walkingAnimationDown
;
Animation
walkingAnimationUp
;
Animation
walkingAnimationLeft
;
Animation
walkingAnimationRight
;
Animation
animations
[
4
];
Animation
*
currentAnimation
;
int
currentAnimationIndex
;
sf
::
Sprite
leftChar
;
sf
::
Sprite
rightChar
;
AnimatedSprite
animatedSprite
;
sf
::
FloatRect
getLocalBounds
()
const
;
sf
::
FloatRect
getGlobalBounds
()
const
;
void
setDirUp
();
void
setDirDown
();
void
setDirLeft
();
void
setDirRight
();
virtual
void
draw
(
sf
::
RenderTarget
&
target
,
sf
::
RenderStates
states
)
const
;
void
update
(
sf
::
Time
deltaTime
);
void
play
();
void
setDir
();
void
setDir
(
int
direction
);
void
setDirIndex
(
int
direction
);
float
nextRedirect
;
std
::
array
<
int
,
2
>
getMovements
(
int
howFar
);
int
diceResult
;
sf
::
RectangleShape
rectangleLeft
;
sf
::
RectangleShape
rectangleRight
;
int
moveLeft
;
int
moveRight
;
bool
active
;
bool
drawMovements
;
void
setBoardPosition
(
int
playerNumber
);
};
#endif
// CHARACTER_H
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sat, Nov 14, 11:40 PM (1 d, 13 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
117832
Default Alt Text
character.h (1 KB)
Attached To
Mode
R82 deerportal
Attached
Detach File
Event Timeline