Merge branch 'master' of github.com:ralucado/WaveGGJ17
This commit is contained in:
commit
5b3b062171
3 changed files with 10 additions and 5 deletions
|
@ -39,5 +39,5 @@ void main(void) {
|
|||
|
||||
vec4 color = vec4(255, 120, 153, 255) / 255.;
|
||||
vec4 colorB = vec4(255,255,255,255)/ 255.;
|
||||
gl_FragColor = (grid(fract(uv))) * color;
|
||||
gl_FragColor = (grid(fract(uv))) * color - line(umuv.y, 0., 0.175, 0.025) * color * 2.;
|
||||
}
|
|
@ -29,10 +29,15 @@ bool Actor::update(float deltaTime, sf::RenderWindow *window) {
|
|||
return this->updateLogic(deltaTime, window);
|
||||
}
|
||||
|
||||
bool Actor::hitBy(Compas enemy) const {
|
||||
if (enemy == compas) std::cout << "dodge" << std::endl;
|
||||
bool Actor::hitBy(Compas enemy) {
|
||||
bool hit = enemy == compas;
|
||||
if (hit) std::cout << "dodge" << std::endl;
|
||||
else std::cout << "hit" << std::endl;
|
||||
return enemy == compas;
|
||||
if (!hit) {
|
||||
character->setState(PlayerState::hurt);
|
||||
animate = PlayerState::inMidle;
|
||||
}
|
||||
return hit;
|
||||
}
|
||||
|
||||
Compas Actor::getAttack() const {
|
||||
|
|
|
@ -12,7 +12,7 @@ public:
|
|||
Actor(int num);
|
||||
bool update(float deltaTime, sf::RenderWindow *window);
|
||||
void draw(sf::RenderWindow *window);
|
||||
bool hitBy(Compas enemy) const;
|
||||
bool hitBy(Compas enemy);
|
||||
Compas getAttack() const;
|
||||
virtual bool event(sf::Event e, bool def) = 0;
|
||||
|
||||
|
|
Reference in a new issue