parametrizado
This commit is contained in:
parent
24af73dda2
commit
bdc23b64e4
3 changed files with 8 additions and 8 deletions
|
@ -5,13 +5,13 @@
|
||||||
class Character : public sf::Sprite{
|
class Character : public sf::Sprite{
|
||||||
private:
|
private:
|
||||||
//CONFIG
|
//CONFIG
|
||||||
const double frameTime = 0.15;
|
const double frameTime = BLACKVALUE/4.0f;
|
||||||
const int numFrames = 4;
|
const int numFrames = 4;
|
||||||
const std::string spriteFile = WORK_DIR+"Resources/spreadsheet.png";
|
const std::string spriteFile = WORK_DIR+"Resources/spreadsheet.png";
|
||||||
//POSICIO PLAYER 1
|
//POSICIO PLAYER 1
|
||||||
float posX1 = 0, posY1 = 250;
|
float posX1 = W_WIDTH*0.05f, posY1 = W_HEIGHT*0.6f;
|
||||||
//POSICIO PLAYER 2
|
//POSICIO PLAYER 2
|
||||||
float posX2 = 500, posY2 = 250;
|
float posX2 = W_WIDTH*0.65f, posY2 = W_HEIGHT*0.6f;
|
||||||
//END CONFIG
|
//END CONFIG
|
||||||
|
|
||||||
int magicNumber;
|
int magicNumber;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
#include "soundmanager.hpp"
|
#include "soundmanager.hpp"
|
||||||
const int SCENE_NUM = 4;
|
const int SCENE_NUM = 4;
|
||||||
#define MARGEERR 0.2f
|
#define MARGEERR 0.2f
|
||||||
#define BLACKVALUE 0.6f
|
#define BLACKVALUE 0.4f
|
||||||
#define W_WIDTH 1024
|
#define W_WIDTH 1024
|
||||||
#define W_HEIGHT 768
|
#define W_HEIGHT 768
|
||||||
const std::string WORK_DIR(getenv("WORK_DIR"));
|
const std::string WORK_DIR(getenv("WORK_DIR"));
|
||||||
|
|
|
@ -12,12 +12,12 @@ Score::Score() {
|
||||||
|
|
||||||
Score::Score(int num) : Score() {
|
Score::Score(int num) : Score() {
|
||||||
if (num == 0) {
|
if (num == 0) {
|
||||||
_posX = 100;
|
_posX = W_WIDTH*0.15f;
|
||||||
_posY = 50;
|
_posY = W_HEIGHT*0.05f;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_posX = 600;
|
_posX = W_WIDTH*0.75f;
|
||||||
_posY = 50;
|
_posY = W_HEIGHT*0.05f;
|
||||||
}
|
}
|
||||||
_scoreSprite[0].setPosition(_posX, _posY);
|
_scoreSprite[0].setPosition(_posX, _posY);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue