Files
Plugin/Source/SenseGloveCoreKismet/Private/SGCoreKismet/SGTimedBuzzCommandKismetLibrary.cpp
T

117 lines
4.2 KiB
C++

/**
* @file
*
* @author Mamadou Babaei <mamadou@senseglove.com>
*
* @section LICENSE
*
* (The MIT License)
*
* Copyright (c) 2020 - 2022 SenseGlove
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* @section DESCRIPTION
*
*
*/
#include "SGCoreKismet/SGTimedBuzzCommandKismetLibrary.h"
#include "SGCore/SGTimedBuzzCommand.h"
USGTimedBuzzCommand* USGTimedBuzzCommandKismetLibrary::MakeTimedBuzzCommand(UObject* WorldContextObject)
{
return USGTimedBuzzCommand::NewTimedBuzzCommand(WorldContextObject);
}
USGTimedBuzzCommand* USGTimedBuzzCommandKismetLibrary::MakeTimedBuzzCommand_F_M_DS_STS(
UObject* WorldContextObject,
const ESGFinger Finger, const int32 Magnitude, const float DurationSeconds, const float StartTimeSeconds)
{
return USGTimedBuzzCommand::NewTimedBuzzCommand(WorldContextObject,
Finger, Magnitude, DurationSeconds, StartTimeSeconds);
}
USGTimedBuzzCommand* USGTimedBuzzCommandKismetLibrary::MakeTimedBuzzCommand_BC_DS_STS(
UObject* WorldContextObject,
const USGBuzzCommand* BaseCommand, const float DurationSeconds, const float StartTimeSeconds)
{
return USGTimedBuzzCommand::NewTimedBuzzCommand(WorldContextObject,
BaseCommand, DurationSeconds, StartTimeSeconds);
}
USGBuzzCommand* USGTimedBuzzCommandKismetLibrary::Copy(UObject* WorldContextObject,
const USGTimedBuzzCommand* TimedBuzzCommand)
{
return TimedBuzzCommand->Copy(WorldContextObject);
}
USGBuzzCommand* USGTimedBuzzCommandKismetLibrary::Merge(UObject* WorldContextObject,
const USGTimedBuzzCommand* A, const USGBuzzCommand* B)
{
return A->Merge(WorldContextObject, B);
}
USGBuzzCommand* USGTimedBuzzCommandKismetLibrary::GetBaseCommand(UObject* WorldContextObject,
const USGTimedBuzzCommand* TimedBuzzCommand)
{
return TimedBuzzCommand->GetBaseCommand(WorldContextObject);
}
int32 USGTimedBuzzCommandKismetLibrary::GetMagnitude(const USGTimedBuzzCommand* TimedBuzzCommand)
{
return TimedBuzzCommand->GetMagnitude();
}
float USGTimedBuzzCommandKismetLibrary::GetDuration(const USGTimedBuzzCommand* TimedBuzzCommand)
{
return TimedBuzzCommand->GetDuration();
}
float USGTimedBuzzCommandKismetLibrary::GetElapsedTime(const USGTimedBuzzCommand* TimedBuzzCommand)
{
return TimedBuzzCommand->GetElapsedTime();
}
bool USGTimedBuzzCommandKismetLibrary::HasTimeElapsed(const USGTimedBuzzCommand* TimedBuzzCommand)
{
return TimedBuzzCommand->HasTimeElapsed();
}
float USGTimedBuzzCommandKismetLibrary::NormalizedTime(const USGTimedBuzzCommand* TimedBuzzCommand, const bool bClamp01)
{
return TimedBuzzCommand->NormalizedTime(bClamp01);
}
void USGTimedBuzzCommandKismetLibrary::ResetTiming(USGTimedBuzzCommand* TimedBuzzCommand)
{
TimedBuzzCommand->ResetTiming();
}
void USGTimedBuzzCommandKismetLibrary::UpdateTiming(USGTimedBuzzCommand* TimedBuzzCommand, const float DeltaSeconds)
{
TimedBuzzCommand->UpdateTiming(DeltaSeconds);
}
FString USGTimedBuzzCommandKismetLibrary::ToString(const USGTimedBuzzCommand* TimedBuzzCommand)
{
return TimedBuzzCommand->ToString();
}