You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
- Renamed EStateTreeConditionOperand and properties of that type. - Renamed FStateTreeEditorNode::Indent Property. - Corrected a few tooltips #rb mikko.mononen, Yoan.StAmant [CL 33614033 by jacob wang in ue5-main branch]
65 lines
1.6 KiB
C++
65 lines
1.6 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "StateTreeNodeBase.h"
|
|
#include "StateTreeExecutionTypes.h"
|
|
#include "StateTreeConditionBase.generated.h"
|
|
|
|
struct FStateTreeExecutionContext;
|
|
|
|
enum class EStateTreeCompare : uint8
|
|
{
|
|
Default,
|
|
Invert,
|
|
};
|
|
|
|
/**
|
|
* Base struct for all conditions.
|
|
*/
|
|
USTRUCT(meta = (Hidden))
|
|
struct STATETREEMODULE_API FStateTreeConditionBase : public FStateTreeNodeBase
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
/** @return True if the condition passes. */
|
|
virtual bool TestCondition(FStateTreeExecutionContext& Context) const { return false; }
|
|
|
|
UPROPERTY()
|
|
EStateTreeExpressionOperand Operand = EStateTreeExpressionOperand::And;
|
|
|
|
UPROPERTY()
|
|
int8 DeltaIndent = 0;
|
|
|
|
UPROPERTY()
|
|
EStateTreeConditionEvaluationMode EvaluationMode = EStateTreeConditionEvaluationMode::Evaluated;
|
|
};
|
|
|
|
/**
|
|
* Base class (namespace) for all common Conditions that are generally applicable.
|
|
* This allows schemas to safely include all conditions child of this struct.
|
|
*/
|
|
USTRUCT(meta = (Hidden))
|
|
struct STATETREEMODULE_API FStateTreeConditionCommonBase : public FStateTreeConditionBase
|
|
{
|
|
GENERATED_BODY()
|
|
};
|
|
|
|
/** Helper macro to define instance data as simple constructible. */
|
|
#define STATETREE_POD_INSTANCEDATA(Type) \
|
|
template <> struct TIsPODType<Type> { enum { Value = true }; }; \
|
|
template<> \
|
|
struct TStructOpsTypeTraits<Type> : public TStructOpsTypeTraitsBase2<Type> \
|
|
{ \
|
|
enum \
|
|
{ \
|
|
WithZeroConstructor = true, \
|
|
WithNoDestructor = true, \
|
|
}; \
|
|
};
|
|
|
|
#if UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_2
|
|
#include "StateTreeExecutionContext.h"
|
|
#include "StateTreePropertyBindings.h"
|
|
#endif
|