You've already forked LuckyWorld
Rename entire project to LuckyWorldV2, including uproject file, folders and so on
This commit is contained in:
42
Source/LuckyWorldV2/TP_VehicleAdvUI.h
Normal file
42
Source/LuckyWorldV2/TP_VehicleAdvUI.h
Normal file
@ -0,0 +1,42 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Blueprint/UserWidget.h"
|
||||
#include "TP_VehicleAdvUI.generated.h"
|
||||
|
||||
/**
|
||||
* Simple Vehicle HUD class
|
||||
* Displays the current speed and gear.
|
||||
* Widget setup is handled in a Blueprint subclass.
|
||||
*/
|
||||
UCLASS(abstract)
|
||||
class LUCKYWORLDV2_API UTP_VehicleAdvUI : public UUserWidget
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
protected:
|
||||
|
||||
/** Controls the display of speed in Km/h or MPH */
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = Vehicle)
|
||||
bool bIsMPH = false;
|
||||
|
||||
public:
|
||||
|
||||
/** Called to update the speed display */
|
||||
void UpdateSpeed(float NewSpeed);
|
||||
|
||||
/** Called to update the gear display */
|
||||
void UpdateGear(int32 NewGear);
|
||||
|
||||
protected:
|
||||
|
||||
/** Implemented in Blueprint to display the new speed */
|
||||
UFUNCTION(BlueprintImplementableEvent, Category = Vehicle)
|
||||
void OnSpeedUpdate(float NewSpeed);
|
||||
|
||||
/** Implemented in Blueprint to display the new gear */
|
||||
UFUNCTION(BlueprintImplementableEvent, Category = Vehicle)
|
||||
void OnGearUpdate(int32 NewGear);
|
||||
};
|
Reference in New Issue
Block a user