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 05:33:34 +01:00

32 lines
725 B
C++

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