Merge branch 'master' of https://github.com/ralucado/WaveGGJ17
This commit is contained in:
commit
32ab66e4dc
2 changed files with 4 additions and 4 deletions
|
@ -141,14 +141,14 @@ void Combat::draw(sf::RenderWindow *window) {
|
|||
|
||||
void Combat::updateEvents(sf::Event e) {
|
||||
if (isPlayerOne()) {
|
||||
if(e.type == sf::Event::KeyPressed && e.key.code == sf::Keyboard::C && !isAttack()) doMahWaves(!isPlayerOne());
|
||||
bool compasFinish = !player->event(e);
|
||||
enemyManager(compasFinish);
|
||||
if(e.type == sf::Event::KeyPressed && e.key.code == sf::Keyboard::C && !isAttack()) doMahWaves(!isPlayerOne());
|
||||
}
|
||||
else if (!ia) {
|
||||
if(e.type == sf::Event::KeyPressed && e.key.code == sf::Keyboard::C && !isAttack()) doMahWaves(!isPlayerOne());
|
||||
bool compasFinish = !enemy->event(e);
|
||||
enemyManager(compasFinish);
|
||||
if(e.type == sf::Event::KeyPressed && e.key.code == sf::Keyboard::C && !isAttack()) doMahWaves(!isPlayerOne());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -207,7 +207,7 @@ void Combat::doMahWaves(bool p) {
|
|||
Wave* w = new Wave(p);
|
||||
//if(!p) w->setPosition(anterior,500);
|
||||
//else w->setPosition(512-512*anterior,500);
|
||||
w->setPosition(anterior,200);
|
||||
w->setPosition(anterior,W_HEIGHT/2);
|
||||
if(i<notes.size()) {
|
||||
if(!p) anterior += 176*notes[i+1];
|
||||
else anterior -= 176*notes[i+1];
|
||||
|
|
|
@ -11,7 +11,7 @@ Wave::Wave(bool dir){
|
|||
direction = dir;
|
||||
ASSERT(texture.loadFromFile(spriteFile));
|
||||
setTexture(texture);
|
||||
setOrigin(texture.getSize().x/2,0);
|
||||
setOrigin(texture.getSize().x/2,texture.getSize().y/2);
|
||||
// sf::IntRect rect = sf::IntRect(0, 0, texture.getSize().x, texture.getSize().y);
|
||||
// setTextureRect(rect);
|
||||
}
|
||||
|
|
Reference in a new issue