123456789101112131415161718192021222324252627282930313233343536 |
- //
- // Created by jovian on 18/07/17.
- //
- #ifndef TINYSHOOTER_CONTROLLER_H
- #define TINYSHOOTER_CONTROLLER_H
- // todo Use HardContacts with scopes like Visuals in Renderer
- #include <box2d/box2d.h>
- class Controller {
- public:
- Controller();
-
- virtual void refresh() = 0; // Read input and modify behaviour
- bool isJumping() const;
- bool isFiring() const;
- bool isShielded() const;
- const b2Vec2 &getVisor() const;
- const b2Vec2 &getMove() const;
- float getZoomScale() const;
- protected:
- bool m_jump;
- bool m_firing;
- bool m_shield;
- b2Vec2 m_visor;
- b2Vec2 m_move;
- float m_zoomScale;
- };
- #endif //TINYSHOOTER_CONTROLLER_H
|