This commit is contained in:
abouteiller
2025-08-28 17:45:36 +02:00
parent 1e157b6876
commit e37555b201
39 changed files with 95 additions and 46 deletions

View File

@ -0,0 +1,56 @@
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Components/SplineComponent.h"
#include "TrackManager.generated.h"
const uint8 bClassic = 0b00;
const uint8 bInverted = 0b01;
const uint8 bDualSens = 0b10;
USTRUCT(BlueprintType, Blueprintable)
struct FSplineHolder
{
GENERATED_USTRUCT_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = HUD)
AActor* Spline = nullptr;
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = HUD)
uint8 Direction = 2;
};
USTRUCT(BlueprintType, Blueprintable)
struct FSplineNode
{
GENERATED_USTRUCT_BODY()
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = HUD)
TArray<FSplineHolder> SplineHolder;
};
UCLASS()
class TUTOBEGGINER_API ATrackManager : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
ATrackManager();
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = HUD)
TArray<FSplineNode> Nodes;
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
};