From e118b1f5d8071460e3a9d4d731c6d69221f785dc Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 6 Mar 2021 19:44:58 +0000 Subject: Carve up the mess in game/vehicles --- game/vehicles/train.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 game/vehicles/train.h (limited to 'game/vehicles/train.h') diff --git a/game/vehicles/train.h b/game/vehicles/train.h new file mode 100644 index 0000000..34a9d28 --- /dev/null +++ b/game/vehicles/train.h @@ -0,0 +1,33 @@ +#ifndef TRAIN_H +#define TRAIN_H + +#include "game/network/link.h" +#include "game/worldobject.h" +#include "railVehicle.h" +#include "vehicle.h" +#include +#include +#include +#include + +class Shader; + +class Train : public Vehicle, public Collection { +public: + explicit Train(const LinkPtr & link, float linkDist = 0) : Vehicle {link, linkDist} { } + + [[nodiscard]] const Location & + getLocation() const override + { + return objects.front()->location; + } + + void render(const Shader & shader) const override; + + void tick(TickDuration elapsed) override; + + void move(TickDuration dur); + [[nodiscard]] Location getBogiePosition(float linkDist, float dist) const; +}; + +#endif -- cgit v1.2.3