blob: 789dd1f362998f813ed128a61d198421a31591ec (
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
30
31
32
33
34
35
36
37
|
/* $Id$ */
/** @file effectvehicle_base.h Base class for all effect vehicles. */
#ifndef EFFECTVEHICLE_BASE_H
#define EFFECTVEHICLE_BASE_H
#include "vehicle_base.h"
/**
* This class 'wraps' Vehicle; you do not actually instantiate this class.
* You create a Vehicle using AllocateVehicle, so it is added to the pool
* and you reinitialize that to a Train using:
* v = new (v) Train();
*
* As side-effect the vehicle type is set correctly.
*
* A special vehicle is one of the following:
* - smoke
* - electric sparks for trains
* - explosions
* - bulldozer (road works)
* - bubbles (industry)
*/
struct EffectVehicle : public Vehicle {
/** Initializes the Vehicle to a special vehicle */
EffectVehicle() { this->type = VEH_EFFECT; }
/** We want to 'destruct' the right class. */
virtual ~EffectVehicle() {}
const char *GetTypeString() const { return "special vehicle"; }
void UpdateDeltaXY(Direction direction);
bool Tick();
};
#endif /* EFFECTVEHICLE_BASE_H */
|