Test
This commit is contained in:
56
Source/TutoBegginer/Game/TrackManager.h
Normal file
56
Source/TutoBegginer/Game/TrackManager.h
Normal 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;
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user