blob: 342c7878a25516ce85e0bc0734980bab3c78f124 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#pragma once
#include "bitmap.h"
enum CarDirection {
North,
East,
South,
West
};
class Level;
class TrainCar {
public:
TrainCar(int x, int y)
: x(x), y(y), m_sprite("../res/car.png") {}
void update(Level&);
void draw(Bitmap&, int, int);
int x, y;
private:
Bitmap m_sprite;
int m_progress{ 0 };
CarDirection m_dir{ North };
};
|