From a32a8447028798ef05af33230fbcfa3195ab430c Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 8 Mar 2021 20:03:40 +0000 Subject: Initial commit of the orders/activities system Has the main window provide some control over our test train --- game/vehicles/train.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'game/vehicles/train.h') diff --git a/game/vehicles/train.h b/game/vehicles/train.h index 34a9d28..a7d4b1b 100644 --- a/game/vehicles/train.h +++ b/game/vehicles/train.h @@ -1,6 +1,9 @@ #ifndef TRAIN_H #define TRAIN_H +#include "game/activities/go.h" // IWYU pragma: keep +#include "game/activities/idle.h" // IWYU pragma: keep +#include "game/activity.h" #include "game/network/link.h" #include "game/worldobject.h" #include "railVehicle.h" @@ -12,7 +15,7 @@ class Shader; -class Train : public Vehicle, public Collection { +class Train : public Vehicle, public Collection, public Can, public Can { public: explicit Train(const LinkPtr & link, float linkDist = 0) : Vehicle {link, linkDist} { } @@ -25,6 +28,8 @@ public: void render(const Shader & shader) const override; void tick(TickDuration elapsed) override; + void doActivity(const Go *, TickDuration) override; + void doActivity(const Idle *, TickDuration) override; void move(TickDuration dur); [[nodiscard]] Location getBogiePosition(float linkDist, float dist) const; -- cgit v1.2.3