This repository has been archived on 2022-12-14. You can view files and clone it, but cannot push or open issues or pull requests.
WaveGGJ17/VaporWaveWars/character.hpp
2017-01-21 14:23:05 +01:00

36 lines
777 B
C++

#ifndef CHARACTER_HPP
#define CHARACTER_HPP
#include "commons.hpp"
class Character : public sf::Sprite{
private:
//CONFIG
const double frameTime = 0.15;
const int numFrames = 4;
const std::string spriteFile = WORK_DIR+"Resources/spreadsheet.png";
//POSICIO PLAYER 1
float posX1 = 0, posY1 = 250;
//POSICIO PLAYER 2
float posX2 = 500, posY2 = 250;
//END CONFIG
int magicNumber;
sf::Texture texture;
int indexX, indexY, width, height;
int playerNum;
PlayerState::playerState actualState;
float timestamp;
public:
int idleFrame;
Character();
Character(int player);
void update(float deltaTime);
void setState(PlayerState::playerState state);
bool isLastFrame();
};
#endif // CHARACTER_HPP