title: invincibility frame and take damage class
body: <p>i am a beginner and i have already read a doc but i need to practice for learn and now i am stuck.</p>
  
  <p>So i would like to do a class takeDommage for apply a number of dmg and activate a countdown for create the invincibility frame.</p>
  
  <p>so i tryed this (see code under)</p>
  
  <p>It's the first class i create alone so i don't understand what's wrong </p>
  
  <p>main :</p>
  
  <pre><code>if(Collision::PixelPerfectTest(sprite_perso,sprite_ennemis))
  {
      std::cout&lt;&lt;"collision pp"&lt;&lt;std::endl;
      takeDommage::prendreDegat(10);
      std::cout&lt;&lt;pv&lt;&lt;std::endl;
  }
  </code></pre>
  
  <p>takeDommage.h :</p>
  
  <pre><code>#ifndef TAKEDOMMAGE_H
  #define TAKEDOMMAGE_H
  
      #include &lt;SFML/Graphics.hpp&gt;
      #include &lt;string&gt;
      #include &lt;iostream&gt;
      #include &lt;cstdlib&gt;
      #include &lt;cmath&gt;
  
  
  class takeDommage
  {
      public:
          takeDommage();
          prendreDegat(int Dommage);
  
          //virtual ~takeDommage();
  
      protected:
          sf::Clock takeDammageClock;
          int Dommage;
  
      private:
  };
  
  #endif // TAKEDOMMAGE_H
  </code></pre>
  
  <p>takeDommage.cpp</p>
  
  <pre><code>#include "takeDommage.h"
  
  takeDommage::takeDommage()
  {
  
  }
  
  void takeDommage::prendreDegat(int Dommage)
  {
      if(takeDammageClock.getElapsedTime().asSeconds()&gt;=3)
          {
              std::cout &lt;&lt; "bite" &lt;&lt; std::endl;
              pv -= Dommage;
              takeDammageClock.restart();
          }
  }
  </code></pre>
  
  <p>error:</p>
  
  <pre><code>||=== Build: Debug in TheGameSFML (compiler: GNU GCC Compiler) ===|
  E:\Work\Top_secret\code\TheGame\main.cpp||In function 'int main()':|
  E:\Work\Top_secret\code\TheGame\main.cpp|168|warning: comparison between signed and unsigned integer expressions [-Wsign-compare]|
  E:\Work\Top_secret\code\TheGame\main.cpp|180|warning: comparison between signed and unsigned integer expressions [-Wsign-compare]|
  E:\Work\Top_secret\code\TheGame\main.cpp|217|error: cannot call member function 'int takeDommage::prendreDegat(int)' without object|
  E:\Work\Top_secret\code\TheGame\main.cpp|156|warning: unused variable 'enemySpawnTimer' [-Wunused-variable]|
  E:\Work\Top_secret\code\TheGame\src\takeDommage.cpp|8|error: prototype for 'void takeDommage::prendreDegat(int)' does not match any in class 'takeDommage'|
  include\takeDommage.h|15|error: candidate is: int takeDommage::prendreDegat(int)|
  ||=== Build failed: 3 error(s), 3 warning(s) (0 minute(s), 0 second(s)) ===|
  </code></pre>