I am learning OOP using c++ on a MicroBit by developing this simple game
gameEngine/inc/Asteroid.h@3:a21366e3261e, 2020-07-09 (annotated)
- Committer:
- ahmeou
- Date:
- Thu Jul 09 06:04:17 2020 +0000
- Revision:
- 3:a21366e3261e
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
ahmeou | 3:a21366e3261e | 1 | #include "Sprite.h" |
ahmeou | 3:a21366e3261e | 2 | |
ahmeou | 3:a21366e3261e | 3 | class Asteroid: public Sprite{ |
ahmeou | 3:a21366e3261e | 4 | public: |
ahmeou | 3:a21366e3261e | 5 | void move(){ |
ahmeou | 3:a21366e3261e | 6 | m_y = (m_y + 1) % 5; |
ahmeou | 3:a21366e3261e | 7 | } |
ahmeou | 3:a21366e3261e | 8 | }; |