![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Simple starter skeleton for asteroids video game.
Diff: Projectile.cpp
- Revision:
- 3:98aa3db6a48f
diff -r 30020ddfccf6 -r 98aa3db6a48f Projectile.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Projectile.cpp Thu Apr 01 19:10:58 2021 +0000 @@ -0,0 +1,18 @@ + +#include "Projectile.h" +#include "graphic.h" + +// Replace the code below. You should pass in the direction of the command +// ship and then have the projectile move along that direction +void Projectile::reset() +{ + + int offset = 64; + m_xPoints[0] = (0+offset); + m_yPoints[0] = (5+offset); + m_xPoints[1] = (0+offset); + m_yPoints[1] = (8+offset); + m_color = YELLW; + m_numPoints = 2; + m_bIsValid = true; +} \ No newline at end of file