LuckyRobotsUnreal/Source/Luckyrobots/TP_VehicleAdvUI.cpp

19 lines
420 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#include "TP_VehicleAdvUI.h"
void UTP_VehicleAdvUI::UpdateSpeed(float NewSpeed)
{
// format the speed to KPH or MPH
float FormattedSpeed = FMath::Abs(NewSpeed) * (bIsMPH ? 0.022f : 0.036f);
// call the Blueprint handler
OnSpeedUpdate(FormattedSpeed);
}
void UTP_VehicleAdvUI::UpdateGear(int32 NewGear)
{
// call the Blueprint handler
OnGearUpdate(NewGear);
}