Jeffery Hurley
/
Asteroids
Simple starter skeleton for asteroids video game.
CommandShip.h@3:98aa3db6a48f, 2021-04-01 (annotated)
- Committer:
- jhurley31
- Date:
- Thu Apr 01 19:10:58 2021 +0000
- Revision:
- 3:98aa3db6a48f
Initial commit.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jhurley31 | 3:98aa3db6a48f | 1 | #pragma once |
jhurley31 | 3:98aa3db6a48f | 2 | #include <list> |
jhurley31 | 3:98aa3db6a48f | 3 | #include "Sprite.h" |
jhurley31 | 3:98aa3db6a48f | 4 | #include "Projectile.h" |
jhurley31 | 3:98aa3db6a48f | 5 | |
jhurley31 | 3:98aa3db6a48f | 6 | #define NUM_LASERS 5 |
jhurley31 | 3:98aa3db6a48f | 7 | |
jhurley31 | 3:98aa3db6a48f | 8 | |
jhurley31 | 3:98aa3db6a48f | 9 | class CommandShip : public Sprite |
jhurley31 | 3:98aa3db6a48f | 10 | { |
jhurley31 | 3:98aa3db6a48f | 11 | public: |
jhurley31 | 3:98aa3db6a48f | 12 | CommandShip(); |
jhurley31 | 3:98aa3db6a48f | 13 | virtual void move(); |
jhurley31 | 3:98aa3db6a48f | 14 | virtual bool checkCollision(const Sprite &InSprite) {return false;} |
jhurley31 | 3:98aa3db6a48f | 15 | |
jhurley31 | 3:98aa3db6a48f | 16 | void rotateLeft(); // if rotating right just stop in place |
jhurley31 | 3:98aa3db6a48f | 17 | void rotateRight(); // if rotating right just stop in place |
jhurley31 | 3:98aa3db6a48f | 18 | void fire(); |
jhurley31 | 3:98aa3db6a48f | 19 | |
jhurley31 | 3:98aa3db6a48f | 20 | Projectile m_lasers[NUM_LASERS]; |
jhurley31 | 3:98aa3db6a48f | 21 | |
jhurley31 | 3:98aa3db6a48f | 22 | }; |