5#include "CoreMinimal.h"
6#include "GameFramework/Pawn.h"
9#include <DeskSimV2/Editor/UI/EditorHUD.h>
10#include <DeskSimV2/SaveGame/IsSaveableInterface.h>
11#include "Camera/CameraComponent.h"
12#include "Engine/StaticMeshSocket.h"
13#include "Train.generated.h"
26 virtual void BeginPlay()
override;
31 virtual void Tick(
float DeltaTime)
override;
34 virtual void SetupPlayerInputComponent(
class UInputComponent* PlayerInputComponent)
override;
36 bool HasWagonsChanged();
37 void AddOrRemoveWagonActors();
42 UFUNCTION(BlueprintPure, Category =
"Speed")
47 UPROPERTY(EditAnywhere, Category =
"Speed")
51 UPROPERTY(EditAnywhere)
52 UStaticMeshComponent* TrainComponent;
54 UStaticMeshSocket* TrainSocket;
56 UPROPERTY(EditAnywhere)
59 UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "UCameraComponent")
60 UCameraComponent* OurCamera;
63 void TrainControl(
float DeltaTime);
64 void UpdateTrain(
float DeltaTime);
65 void UpdateWagons(
float DeltaTime);
66 void UpdateWagonEditor();
70 void AccelerateAxis(
float AxisValue);
71 void BreakAxis(
float AxisValue);
76 FVector GetPosition();
77 FVector GetRotation();
85 TArray<
AWagon*> WagonActors;
87 UPROPERTY(EditAnywhere, BlueprintReadOnly)
93 float TimesinceUpdate;
95 FTimerHandle TextTimerHandle;
103 float AxisAcceleration;
104 float AxisBreakForce;
108 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Train")
109 float AccelerationStrength = 200.0f;
111 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Train")
112 float BrakingStrength = 200.0f;
114 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Train")
115 float MaxAcceleration = 200.f;
117 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Train")
118 float MaxBreakForce = 200.f;
121 float DistanceAlongSpline;
124 UPROPERTY(VisibleAnywhere)
125 bool bEmergencyStop = false;
132 FVector TotalWagonOffset;
A component for placing static meshes along a spline.
Definition: EditorHUD.h:91
Definition: SplineActor.h:22
Definition: IsSaveableInterface.h:20