12345678910111213141516171819202122232425 |
- #include "Arme.h"
- Arme::Arme( int degats, WeaponType model, Tirs_Gest* tirsGest, Uint32 freqShot )
- :m_degats( degats ), m_model( model ), m_tirsGest( tirsGest ), m_lastShot( 0 ), m_freqShot( freqShot )
- {
- //ctor
- }
- Arme::~Arme()
- {
- //dtor
- }
- WeaponType Arme::getModel()
- {
- return m_model;
- }
- void Arme::gachette( Vec pos, Vec visee, bool allie )
- {
- if ( SDL_GetTicks() - m_lastShot > m_freqShot ) {
- m_lastShot = SDL_GetTicks();
- tirer( pos, visee, allie);
- }
- }
|