merge fix
This commit is contained in:
parent
f090173a1e
commit
0859b78f94
3 changed files with 4 additions and 4 deletions
|
@ -14,10 +14,10 @@ void Combat::update(float deltaTime, sf::RenderWindow *window) {
|
|||
void Combat::draw(sf::RenderWindow *window) {
|
||||
player.draw(window);
|
||||
enemy->draw(window);
|
||||
//draw background
|
||||
|
||||
}
|
||||
|
||||
void Combat::updateButtons(sf::Event e) {
|
||||
void Combat::updateEvents(sf::Event e) {
|
||||
if (playerOneTurn) playerOneTurn = player.event(e);
|
||||
else if (!ia) playerOneTurn = !enemy->event(e);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ public:
|
|||
Combat& operator=(Combat&& m) = delete;
|
||||
void update(float deltaTime, sf::RenderWindow *window) final override;
|
||||
void draw(sf::RenderWindow *window) final override;
|
||||
void updateButtons(sf::Event e) final override;
|
||||
void updateEvents(sf::Event e) final override;
|
||||
private:
|
||||
Compas compas;
|
||||
bool playerOneTurn, ia;
|
||||
|
|
|
@ -10,7 +10,7 @@ class Scene
|
|||
virtual ~Scene();
|
||||
virtual void update(float deltaTime, sf::RenderWindow *window) = 0;
|
||||
virtual void draw(sf::RenderWindow *window) = 0;
|
||||
virtual void updateEvents(sf::Event) = 0;
|
||||
virtual void updateEvents(sf::Event e) = 0;
|
||||
protected:
|
||||
Game* parent;
|
||||
};
|
||||
|
|
Reference in a new issue