You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
Before: 3548 unity files Total CPU Time: 47343.578125 s Total time in Parallel executor: 494.60 seconds After: 3445 unity files Total CPU Time: 46044.671875 s Total time in Parallel executor: 468.51 seconds #jira #preflight 63336159b20e73a098b7f24f [CL 22218213 by bryan sefcik in ue5-main branch]
46 lines
1.7 KiB
C++
46 lines
1.7 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "Conditions/StateTreeObjectConditions.h"
|
|
#include "StateTreeExecutionContext.h"
|
|
|
|
#include UE_INLINE_GENERATED_CPP_BY_NAME(StateTreeObjectConditions)
|
|
|
|
#define LOCTEXT_NAMESPACE "StateTreeEditor"
|
|
|
|
|
|
//----------------------------------------------------------------------//
|
|
// FStateTreeCondition_ObjectIsValid
|
|
//----------------------------------------------------------------------//
|
|
|
|
bool FStateTreeObjectIsValidCondition::TestCondition(FStateTreeExecutionContext& Context) const
|
|
{
|
|
const InstanceDataType& InstanceData = Context.GetInstanceData<InstanceDataType>(*this);
|
|
const bool bResult = IsValid(InstanceData.Object);
|
|
return bResult ^ bInvert;
|
|
}
|
|
|
|
//----------------------------------------------------------------------//
|
|
// FStateTreeCondition_ObjectEquals
|
|
//----------------------------------------------------------------------//
|
|
|
|
bool FStateTreeObjectEqualsCondition::TestCondition(FStateTreeExecutionContext& Context) const
|
|
{
|
|
const InstanceDataType& InstanceData = Context.GetInstanceData<InstanceDataType>(*this);
|
|
const bool bResult = InstanceData.Left == InstanceData.Right;
|
|
return bResult ^ bInvert;
|
|
}
|
|
|
|
//----------------------------------------------------------------------//
|
|
// FStateTreeCondition_ObjectIsChildOfClass
|
|
//----------------------------------------------------------------------//
|
|
|
|
bool FStateTreeObjectIsChildOfClassCondition::TestCondition(FStateTreeExecutionContext& Context) const
|
|
{
|
|
const InstanceDataType& InstanceData = Context.GetInstanceData<InstanceDataType>(*this);
|
|
const bool bResult = InstanceData.Object && InstanceData.Class
|
|
&& InstanceData.Object->GetClass()->IsChildOf(InstanceData.Class);
|
|
return bResult ^ bInvert;
|
|
}
|
|
|
|
#undef LOCTEXT_NAMESPACE
|