Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed N5110 ShiftReg PinDetect
Game.h
- Committer:
- Siriagus
- Date:
- 2015-05-08
- Revision:
- 11:adb68da98262
- Parent:
- 9:da608ae65df9
- Child:
- 12:8178fad5e660
File content as of revision 11:adb68da98262:
#ifndef GAME_H
#define GAME_H
#include "State.h"
#include "Resources.h" // TODO: Move to State.h ?
#include "Entity.h"
#include "map.h"
#include <vector>
struct Point
{
int x;
int y;
int vx, vy;
};
class Game : public State
{
public:
Game(StateManager* fsm, N5110 *lcd, InputManager* input)
: State(fsm, lcd, input) {init();}
virtual void update(float dt);
virtual void render();
void init();
private:
Entity player;
bool onGround; // true if player is on ground
bool releasedBtnB;
std::vector<Point*> bullets;
};
#endif