Agrarsense
|
#include <SimulationLevelManager.h>
Public Member Functions | |
ASimulationLevelManager () | |
ESimulationState | GetSimulationState () const |
void | SetSimulationState (ESimulationState newState) |
ESimulationPhase | GetSimulationPhase () const |
void | SetSimulationPhase (ESimulationPhase newPhase) |
USensorsManagerComponent * | GetSensorsManager () const |
AVehicle * | GetManuallyControlledVehicle () |
bool | TakeManualControlOfVehicle (AVehicle *Vehicle) |
void | CeaseManualControlOfVehicle () |
Public Attributes | |
FSimulationStateChanged | OnSimulationStateChanged |
FSimulationPhaseChanged | OnSimulationPhaseChanged |
TArray< FLevelTeleportLocation > | TeleportLocations |
Protected Member Functions | |
virtual void | BeginPlay () override |
Protected Attributes | |
TObjectPtr< USensorsManagerComponent > | SensorsManager |
Private Attributes | |
ESimulationState | SimulationState |
ESimulationPhase | SimulationPhase |
TObjectPtr< AVehicle > | ManuallyControlledVehicle |
Manager for handling simulation level high level state, phase etc.
Definition at line 24 of file SimulationLevelManager.h.
ASimulationLevelManager::ASimulationLevelManager | ( | ) |
Definition at line 13 of file SimulationLevelManager.cpp.
References SensorsManager.
|
overrideprotectedvirtual |
Definition at line 19 of file SimulationLevelManager.cpp.
void ASimulationLevelManager::CeaseManualControlOfVehicle | ( | ) |
Cease manual control of a vehicle
Definition at line 58 of file SimulationLevelManager.cpp.
References UAgrarsenseStatics::GetSpectator(), ManuallyControlledVehicle, ManualVehicleControl, Normal, SetSimulationPhase(), and SimulationPhase.
|
inline |
Get vehicle that is currently manually controlled by the player. Will return nullptr if not in manual control
Definition at line 72 of file SimulationLevelManager.h.
|
inline |
Get sensor manager attached to this Vehicle
Definition at line 62 of file SimulationLevelManager.h.
References AVehicle::SensorsManager.
Referenced by USimulatorJsonParser::SpawnSensorWorld().
|
inline |
|
inline |
Get the current state of simulation
Definition at line 33 of file SimulationLevelManager.h.
void ASimulationLevelManager::SetSimulationPhase | ( | ESimulationPhase | newPhase | ) |
Definition at line 31 of file SimulationLevelManager.cpp.
References OnSimulationPhaseChanged, and SimulationPhase.
Referenced by CeaseManualControlOfVehicle(), and TakeManualControlOfVehicle().
void ASimulationLevelManager::SetSimulationState | ( | ESimulationState | newState | ) |
Definition at line 24 of file SimulationLevelManager.cpp.
References OnSimulationStateChanged, and SimulationState.
bool ASimulationLevelManager::TakeManualControlOfVehicle | ( | AVehicle * | Vehicle | ) |
Take manual control of a vehicle
Vehicle | Vehicle to possess |
Definition at line 38 of file SimulationLevelManager.cpp.
References ManuallyControlledVehicle, ManualVehicleControl, SetSimulationPhase(), and Vehicle.
Referenced by USimulatorJsonParser::TeleportSpectatorOrFollowActorIfField().
|
private |
Vehicle that is currently in manual control of the player
Definition at line 114 of file SimulationLevelManager.h.
Referenced by CeaseManualControlOfVehicle(), and TakeManualControlOfVehicle().
FSimulationPhaseChanged ASimulationLevelManager::OnSimulationPhaseChanged |
Event triggered when simulation phase has been changed
Definition at line 55 of file SimulationLevelManager.h.
Referenced by SetSimulationPhase().
FSimulationStateChanged ASimulationLevelManager::OnSimulationStateChanged |
Event triggered when simulation state has been changed
Definition at line 49 of file SimulationLevelManager.h.
Referenced by SetSimulationState().
|
protected |
Definition at line 101 of file SimulationLevelManager.h.
Referenced by ASimulationLevelManager().
|
private |
Current simulation phase
Definition at line 110 of file SimulationLevelManager.h.
Referenced by CeaseManualControlOfVehicle(), and SetSimulationPhase().
|
private |
Current simulation state
Definition at line 107 of file SimulationLevelManager.h.
Referenced by SetSimulationState().
TArray<FLevelTeleportLocation> ASimulationLevelManager::TeleportLocations |
Definition at line 92 of file SimulationLevelManager.h.