Merge branch 'serk'
This commit is contained in:
commit
65e6604673
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 color = vec4(255, 120, 153, 255) / 255.;
|
||||||
vec4 colorB = vec4(255,255,255,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);
|
return this->updateLogic(deltaTime, window);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Actor::hitBy(Compas enemy) const {
|
bool Actor::hitBy(Compas enemy) {
|
||||||
if (enemy == compas) std::cout << "dodge" << std::endl;
|
bool hit = enemy == compas;
|
||||||
|
if (hit) std::cout << "dodge" << std::endl;
|
||||||
else std::cout << "hit" << 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 {
|
Compas Actor::getAttack() const {
|
||||||
|
|
|
@ -12,7 +12,7 @@ public:
|
||||||
Actor(int num);
|
Actor(int num);
|
||||||
bool update(float deltaTime, sf::RenderWindow *window);
|
bool update(float deltaTime, sf::RenderWindow *window);
|
||||||
void draw(sf::RenderWindow *window);
|
void draw(sf::RenderWindow *window);
|
||||||
bool hitBy(Compas enemy) const;
|
bool hitBy(Compas enemy);
|
||||||
Compas getAttack() const;
|
Compas getAttack() const;
|
||||||
virtual bool event(sf::Event e, bool def) = 0;
|
virtual bool event(sf::Event e, bool def) = 0;
|
||||||
|
|
||||||
|
|
Reference in a new issue