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.
GameEngine/Block.h
- Committer:
- taylorza
- Date:
- 2015-01-28
- Revision:
- 0:d85c449aca6d
File content as of revision 0:d85c449aca6d:
#include "ImageFrame.h"
#ifndef __BLOCK_H__
#define __BLOCK_H__
class Block
{
public:
enum Type { Background, Foreground, Solid, Deadly, Pickup };
public:
Block(const ImageFrame *frame, Type type) :
_frame(frame),
_type(type),
_data(0)
{
}
Block(const ImageFrame *frame, Type type, uint8_t data) :
_frame(frame),
_type(type),
_data(data)
{
}
inline const ImageFrame& getFrame() const { return *_frame; }
inline uint8_t getData() const { return _data; }
inline Type getType() const { return (Type)_type; }
private:
const ImageFrame *_frame;
uint8_t _type;
uint8_t _data;
};
#endif //__BLOCK_H__