void CollisionManager::CollideTankMine( Tank& tank, Mine& mine ) { MessageBeep(MB_ICONSTOP); tank.SetCoordinates( mine.GetCoordinates() ); mine.Explode(); mine.Damage(tank); mine.Die(); }
void CollisionManager::CollideTankTerrain( Tank& tank, Terrain& terrain ) { switch( terrain.Type() ) { case Terrain::Rock: MessageBeep(MB_ICONHAND); break; case Terrain::Ice: if( ! tank.IsSkidding() ) { tank.SetCoordinates( terrain.GetCoordinates() ); tank.Skid(); } break; case Terrain::Grass: tank.SetCoordinates( terrain.GetCoordinates() ); break; } }