summaryrefslogtreecommitdiff
path: root/game/vehicles/railVehicle.h
blob: a089f1d1ff8b6051e4acd53e935f99a2ba08231c (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
28
29
#ifndef RAILVEHICLE_H
#define RAILVEHICLE_H

#include "gfx/renderable.h"
#include "railVehicleClass.h"
#include <array>
#include <location.hpp>
#include <memory>
#include <utility>

class Shader;

class Train;
class RailVehicle : public Renderable {
public:
	explicit RailVehicle(RailVehicleClassPtr rvc) : rvClass {std::move(rvc)} { }

	void move(const Train *, float & trailBy);

	void render(const Shader & shader) const override;

	Location location;

	RailVehicleClassPtr rvClass;
	std::array<Location, 2> bogies;
};
using RailVehiclePtr = std::unique_ptr<RailVehicle>;

#endif