Fixed warnings.

master
bog 7 years ago
parent 30f12a2d30
commit 9e55d4135b
  1. 3
      src/Hero.cpp
  2. 4
      src/Kraken.cpp
  3. 2
      src/main.cpp

@ -75,7 +75,8 @@ bool Hero::attack()
} }
else {m_speedX=0;m_speedY=0; else {m_speedX=0;m_speedY=0;
m_attacking=false;hasAttacked=false;} m_attacking=false;hasAttacked=false;}
return false;
} }

@ -139,7 +139,7 @@ void Kraken::drawATentacle()
m_tentacle.setPosition(m_coords[i]*TILE_WIDTH,m_coords[i+1]*TILE_HEIGHT); m_tentacle.setPosition(m_coords[i]*TILE_WIDTH,m_coords[i+1]*TILE_HEIGHT);
m_level->Getcase()->Getwindow()->draw(m_tentacle);} m_level->Getcase()->Getwindow()->draw(m_tentacle);}
if (ended){for(int i(0); i<m_coords.size();i++){m_coords[i]=0;}} if (ended){for(size_t i(0); i<m_coords.size();i++){m_coords[i]=0;}}
} }
@ -151,7 +151,7 @@ bool Kraken::isThereCollision(int x, int y)
{ {
bool temp(false); bool temp(false);
for(int i(0);i<m_coords.size()-2;i+=2){ for(size_t i(0);i<m_coords.size()-2;i+=2){
if(m_coords[i]==x && m_coords[i+1]==y) if(m_coords[i]==x && m_coords[i+1]==y)
{std::cout<<" touche "; temp=true;} {std::cout<<" touche "; temp=true;}

@ -100,6 +100,8 @@ int main()
{ {
if(event.key.code==Keyboard::Space){attack=true; } if(event.key.code==Keyboard::Space){attack=true; }
} }
default: break;
} }
// if(Keyboard::isKeyPressed(Keyboard::Add)){} // if(Keyboard::isKeyPressed(Keyboard::Add)){}
if(Keyboard::isKeyPressed(Keyboard::Up)) {Josh.SetspeedY(-0.2);} if(Keyboard::isKeyPressed(Keyboard::Up)) {Josh.SetspeedY(-0.2);}

Loading…
Cancel
Save