GSEventVehicleCrashed Class Reference

Event Vehicle Crash, indicating a vehicle of yours is crashed. More...

Inheritance diagram for GSEventVehicleCrashed:

GSEvent

Public Types

enum  CrashReason {
  CRASH_TRAIN,
  CRASH_RV_LEVEL_CROSSING,
  CRASH_RV_UFO,
  CRASH_PLANE_LANDING,
  CRASH_AIRCRAFT_NO_AIRPORT,
  CRASH_FLOODED
}
 The reasons for vehicle crashes. More...

Public Member Functions

 GSEventVehicleCrashed (VehicleID vehicle, TileIndex crash_site, CrashReason crash_reason)
VehicleID GetVehicleID ()
 Get the VehicleID of the crashed vehicle.
TileIndex GetCrashSite ()
 Find the tile the vehicle crashed.
CrashReason GetCrashReason ()
 Get the reason for crashing.

Static Public Member Functions

static GSEventVehicleCrashedConvert (GSEvent *instance)
 Convert an GSEvent to the real instance.

Detailed Description

Event Vehicle Crash, indicating a vehicle of yours is crashed.

It contains the crash site, the crashed vehicle and the reason for the crash.


Member Enumeration Documentation

The reasons for vehicle crashes.

Enumerator:
CRASH_TRAIN  Two trains collided.
CRASH_RV_LEVEL_CROSSING  Road vehicle got under a train.
CRASH_RV_UFO  Road vehicle got under a landing ufo.
CRASH_PLANE_LANDING  Plane crashed on landing.
CRASH_AIRCRAFT_NO_AIRPORT  Aircraft crashed after it found not a single airport for landing.
CRASH_FLOODED  Vehicle was flooded.


Constructor & Destructor Documentation

GSEventVehicleCrashed::GSEventVehicleCrashed ( VehicleID  vehicle,
TileIndex  crash_site,
CrashReason  crash_reason 
)

Parameters:
vehicle The vehicle that crashed.
crash_site Where the vehicle crashed.
crash_reason The reason why the vehicle crashed.


Member Function Documentation

static GSEventVehicleCrashed* GSEventVehicleCrashed::Convert ( GSEvent instance  )  [inline, static]

Convert an GSEvent to the real instance.

Parameters:
instance The instance to convert.
Returns:
The converted instance.

VehicleID GSEventVehicleCrashed::GetVehicleID (  )  [inline]

Get the VehicleID of the crashed vehicle.

Returns:
The crashed vehicle.

TileIndex GSEventVehicleCrashed::GetCrashSite (  )  [inline]

Find the tile the vehicle crashed.

Returns:
The crash site.

CrashReason GSEventVehicleCrashed::GetCrashReason (  )  [inline]

Get the reason for crashing.

Returns:
The reason for crashing


Generated on Wed Apr 1 19:10:00 2015 for OpenTTD Game API by  doxygen 1.5.6