Added phone item
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
// © 2025 Naked People Team. All Rights Reserved.
|
||||
|
||||
|
||||
#include "PhoneItemInstance.h"
|
||||
|
||||
#include "PhoneItemDefinition.h"
|
||||
#include "StructUtils/InstancedStruct.h"
|
||||
|
||||
void UPhoneItemInstance::CaptureState(FInstancedStruct& OutState) const
|
||||
{
|
||||
FPhoneInstanceState PhoneState;
|
||||
PhoneState.CurrentBattery = CurrentBattery;
|
||||
OutState.InitializeAs<FPhoneInstanceState>(PhoneState);
|
||||
}
|
||||
|
||||
void UPhoneItemInstance::ApplyState(const FInstancedStruct& InState)
|
||||
{
|
||||
if (const FPhoneInstanceState* PhoneState = InState.GetPtr<FPhoneInstanceState>())
|
||||
{
|
||||
CurrentBattery = PhoneState->CurrentBattery;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user