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

Binary file not shown.

View File

@ -3,18 +3,3 @@
#include "SplineNode.h" #include "SplineNode.h"
// Sets default values
ASplineNode::ASplineNode()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = false;
}
// Called when the game starts or when spawned
void ASplineNode::BeginPlay()
{
Super::BeginPlay();
}

View File

@ -6,37 +6,13 @@
#include "GameFramework/Actor.h" #include "GameFramework/Actor.h"
#include "SplineNode.generated.h" #include "SplineNode.generated.h"
class USplineComponent; USTRUCT()
struct FSplineNodeOld
const uint8 bClassic = 0b00;
const uint8 bInverted = 0b01;
const uint8 bDualSens = 0b10;
class SplineHolder
{ {
SplineHolder() GENERATED_USTRUCT_BODY()
{
Spline = nullptr;
Direction = bDualSens;
}
USplineComponent* Spline; // UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = HUD)
uint8 Direction : 3; // TArray<AActor*> Splines;
};
FString Name;
UCLASS()
class TUTOBEGGINER_API ASplineNode : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
ASplineNode();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
TArray<SplineHolder> Splines;
}; };

View File

@ -0,0 +1,27 @@
// Fill out your copyright notice in the Description page of Project Settings.
#include "TrackManager.h"
// Sets default values
ATrackManager::ATrackManager()
{
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
PrimaryActorTick.bCanEverTick = true;
}
// Called when the game starts or when spawned
void ATrackManager::BeginPlay()
{
Super::BeginPlay();
}
// Called every frame
void ATrackManager::Tick(float DeltaTime)
{
Super::Tick(DeltaTime);
}

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;
};

View File

@ -12,6 +12,11 @@
"Engine", "Engine",
"UMG" "UMG"
] ]
},
{
"Name": "TutoBegginerEditor",
"Type": "Editor",
"LoadingPhase": "Default"
} }
], ],
"Plugins": [ "Plugins": [