Arme.cpp 492 B

12345678910111213141516171819202122232425
  1. #include "Arme.h"
  2. Arme::Arme( int degats, WeaponType model, Tirs_Gest* tirsGest, Uint32 freqShot )
  3. :m_degats( degats ), m_model( model ), m_tirsGest( tirsGest ), m_lastShot( 0 ), m_freqShot( freqShot )
  4. {
  5. //ctor
  6. }
  7. Arme::~Arme()
  8. {
  9. //dtor
  10. }
  11. WeaponType Arme::getModel()
  12. {
  13. return m_model;
  14. }
  15. void Arme::gachette( Vec pos, Vec visee, bool allie )
  16. {
  17. if ( SDL_GetTicks() - m_lastShot > m_freqShot ) {
  18. m_lastShot = SDL_GetTicks();
  19. tirer( pos, visee, allie);
  20. }
  21. }