shader fix
This commit is contained in:
parent
279c401f4d
commit
267df99593
5 changed files with 11 additions and 6 deletions
|
@ -1,12 +1,12 @@
|
||||||
#include "combat.hpp"
|
#include "combat.hpp"
|
||||||
|
|
||||||
Combat::Combat() {
|
Combat::Combat() {
|
||||||
// ia = false;
|
ia = false;
|
||||||
ia = true;
|
// ia = true;
|
||||||
attacking = playerOneTurn = true;
|
attacking = playerOneTurn = true;
|
||||||
player = new Player(0);
|
player = new Player(0);
|
||||||
enemy = new IaEnemy(1);
|
// enemy = new IaEnemy(1);
|
||||||
// enemy = new Player(1);
|
enemy = new Player(1);
|
||||||
initShader();
|
initShader();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,10 @@ void Compas::incraeseTime() {
|
||||||
++spaceTime;
|
++spaceTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Compas::isPressed() const {
|
||||||
|
return isPress;
|
||||||
|
}
|
||||||
|
|
||||||
int Compas::get (int i) const {
|
int Compas::get (int i) const {
|
||||||
return notes[i];
|
return notes[i];
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,6 +20,7 @@ public:
|
||||||
void add();
|
void add();
|
||||||
void end();
|
void end();
|
||||||
void incraeseTime();
|
void incraeseTime();
|
||||||
|
bool isPressed() const;
|
||||||
bool operator ==(const Compas& d) const;
|
bool operator ==(const Compas& d) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
IaEnemy::IaEnemy() : Actor(1) {}
|
IaEnemy::IaEnemy() : Actor(1) {}
|
||||||
IaEnemy::IaEnemy(int numplayer): Actor(numplayer) {}
|
IaEnemy::IaEnemy(int numplayer): Actor(numplayer) {}
|
||||||
bool IaEnemy::updateLogic(float deltaTime, sf::RenderWindow *window) {
|
bool IaEnemy::updateLogic(float deltaTime, sf::RenderWindow *window) {
|
||||||
//some playe return true
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ bool Player::event(sf::Event e) {
|
||||||
if(e.key.code == sf::Keyboard::C) compas.start();
|
if(e.key.code == sf::Keyboard::C) compas.start();
|
||||||
if(e.key.code == sf::Keyboard::Space) {
|
if(e.key.code == sf::Keyboard::Space) {
|
||||||
compas.add();
|
compas.add();
|
||||||
animate = true;
|
if (compas.isPressed() && !animate) animate = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case (sf::Event::KeyReleased):
|
case (sf::Event::KeyReleased):
|
||||||
|
|
Reference in a new issue