DeskSim v2 0.1
Train simulator prototype created for Lokførerskolen
Public Member Functions | Public Attributes | Protected Member Functions | List of all members
ATrainStatusTriggerBox Class Reference

The status trigger box is used to send status updates to the controller. More...

#include <TrainStatusTriggerBox.h>

Inheritance diagram for ATrainStatusTriggerBox:
ATrainTriggerBox

Public Member Functions

 ATrainStatusTriggerBox ()
 Sets default values.
 
void Tick (float DeltaTime) override
 Called every frame. More...
 
void OnOverlapBegin (class AActor *OverlappedActor, class AActor *OtherActor) override
 Runs when overlapping begins. More...
 
void OnOverlapEnd (class AActor *OverlappedActor, class AActor *OtherActor) override
 Runs when overlapping ends. More...
 
void SendStatusToController ()
 Sends the emergency status to the controller.
 
void EmergencyIf (bool bEqual)
 Sends emergency stop to the train if signal status match or not. More...
 
void EmergencyIfNot ()
 Sends emergency stop to the train if signal status does not match.
 
- Public Member Functions inherited from ATrainTriggerBox
 ATrainTriggerBox ()
 Sets default values.
 
virtual void Tick (float DeltaTime)
 Called every frame. More...
 
virtual void OnOverlapBegin (class AActor *OverlappedActor, class AActor *OtherActor)
 Runs when overlapping begins. More...
 
virtual void OnOverlapEnd (class AActor *OverlappedActor, class AActor *OtherActor)
 Runs when overlapping ends. More...
 

Public Attributes

ETriggerStatusType StatusTrigger
 Which trigger type to use for this box.
 
ESignalStatus SignalCompare
 The signal status to compare against.
 
- Public Attributes inherited from ATrainTriggerBox
TSubclassOf< ACentralSignalControllerCentralControllerClass
 Contains the class of the controller.
 
ACentralSignalControllerCentralController
 Reference to the controller.
 
ATrainTrain
 Reference to the overlapping train.
 
ESignalType SignalType
 
FName SignalID
 

Protected Member Functions

void BeginPlay () override
 Called when the game starts or when spawned. More...
 
void EndPlay (EEndPlayReason::Type EndPlayReason) override
 Called when game stops or when despawned. More...
 
virtual void BeginPlay ()
 Called when the game starts or when spawned. More...
 
virtual void EndPlay (EEndPlayReason::Type EndPlayReason)
 Called when game stops or when despawned. More...
 

Detailed Description

The status trigger box is used to send status updates to the controller.

Currently the only status which is sent is emergency stop. The status is sent after a certain condition, such as entering the zone and a signal is of a certain signal status.

Member Function Documentation

◆ BeginPlay()

void ATrainStatusTriggerBox::BeginPlay ( )
overrideprotectedvirtual

Called when the game starts or when spawned.

Reimplemented from ATrainTriggerBox.

◆ EmergencyIf()

void ATrainStatusTriggerBox::EmergencyIf ( bool  bEqual)

Sends emergency stop to the train if signal status match or not.

Parameters
bEqual- Used to switch between == and !=

◆ EndPlay()

void ATrainStatusTriggerBox::EndPlay ( EEndPlayReason::Type  EndPlayReason)
overrideprotectedvirtual

Called when game stops or when despawned.

Reimplemented from ATrainTriggerBox.

◆ OnOverlapBegin()

void ATrainStatusTriggerBox::OnOverlapBegin ( class AActor *  OverlappedActor,
class AActor *  OtherActor 
)
overridevirtual

Runs when overlapping begins.

Reimplemented from ATrainTriggerBox.

◆ OnOverlapEnd()

void ATrainStatusTriggerBox::OnOverlapEnd ( class AActor *  OverlappedActor,
class AActor *  OtherActor 
)
overridevirtual

Runs when overlapping ends.

Reimplemented from ATrainTriggerBox.

◆ Tick()

void ATrainStatusTriggerBox::Tick ( float  DeltaTime)
overridevirtual

Called every frame.

Reimplemented from ATrainTriggerBox.


The documentation for this class was generated from the following files: