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/actor.cpp
2017-01-21 05:33:17 +01:00

19 lines
439 B
C++

#include "actor.hpp"
Actor::Actor() {}
Actor::Actor(int num) {
this->character = new Character(num);
}
void Actor::draw(sf::RenderWindow *window) {
window->draw(*character);
}
bool Actor::update(float deltaTime, sf::RenderWindow *window) {
character->update(deltaTime);
if (animate) {
character->setState(PlayerState::attacking);
animate = false;
}
return this->updateLogic(deltaTime, window);
}