You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
107 lines
3.1 KiB
C
107 lines
3.1 KiB
C
|
|
// Copyright Epic Games, Inc. All Rights Reserved.
|
|||
|
|
|
|||
|
|
#pragma once
|
|||
|
|
|
|||
|
|
#include "UObject/Object.h"
|
|||
|
|
#include "StateTreeConditionBase.h"
|
|||
|
|
#include "StateTreeObjectConditions.generated.h"
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* Condition testing if specified object is valid.
|
|||
|
|
*/
|
|||
|
|
USTRUCT()
|
|||
|
|
struct STATETREEMODULE_API FStateTreeObjectIsValidConditionInstanceData
|
|||
|
|
{
|
|||
|
|
GENERATED_BODY()
|
|||
|
|
|
|||
|
|
UPROPERTY(EditAnywhere, Category = Input)
|
|||
|
|
TObjectPtr<UObject> Object = nullptr;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
USTRUCT(DisplayName="Object Is Valid")
|
|||
|
|
struct STATETREEMODULE_API FStateTreeObjectIsValidCondition : public FStateTreeConditionCommonBase
|
|||
|
|
{
|
|||
|
|
GENERATED_BODY()
|
|||
|
|
|
|||
|
|
typedef FStateTreeObjectIsValidConditionInstanceData InstanceDataType;
|
|||
|
|
|
|||
|
|
FStateTreeObjectIsValidCondition() = default;
|
|||
|
|
explicit FStateTreeObjectIsValidCondition(const EStateTreeCompare InInverts)
|
|||
|
|
: bInvert(InInverts == EStateTreeCompare::Invert)
|
|||
|
|
{}
|
|||
|
|
|
|||
|
|
virtual const UStruct* GetInstanceDataType() const override { return InstanceDataType::StaticStruct(); }
|
|||
|
|
virtual bool TestCondition(FStateTreeExecutionContext& Context) const override;
|
|||
|
|
|
|||
|
|
UPROPERTY(EditAnywhere, Category = Parameter)
|
|||
|
|
bool bInvert = false;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* Condition testing if two object pointers point to the same object.
|
|||
|
|
*/
|
|||
|
|
USTRUCT()
|
|||
|
|
struct STATETREEMODULE_API FStateTreeObjectEqualsConditionInstanceData
|
|||
|
|
{
|
|||
|
|
GENERATED_BODY()
|
|||
|
|
|
|||
|
|
UPROPERTY(EditAnywhere, Category = Input)
|
|||
|
|
TObjectPtr<UObject> Left = nullptr;
|
|||
|
|
|
|||
|
|
UPROPERTY(EditAnywhere, Category = Parameter)
|
|||
|
|
TObjectPtr<UObject> Right = nullptr;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
USTRUCT(DisplayName="Object Equals")
|
|||
|
|
struct STATETREEMODULE_API FStateTreeObjectEqualsCondition : public FStateTreeConditionCommonBase
|
|||
|
|
{
|
|||
|
|
GENERATED_BODY()
|
|||
|
|
|
|||
|
|
typedef FStateTreeObjectEqualsConditionInstanceData InstanceDataType;
|
|||
|
|
|
|||
|
|
FStateTreeObjectEqualsCondition() = default;
|
|||
|
|
explicit FStateTreeObjectEqualsCondition(const EStateTreeCompare InInverts)
|
|||
|
|
: bInvert(InInverts == EStateTreeCompare::Invert)
|
|||
|
|
{}
|
|||
|
|
|
|||
|
|
virtual const UStruct* GetInstanceDataType() const override { return InstanceDataType::StaticStruct(); }
|
|||
|
|
virtual bool TestCondition(FStateTreeExecutionContext& Context) const override;
|
|||
|
|
|
|||
|
|
UPROPERTY(EditAnywhere, Category = Parameter)
|
|||
|
|
bool bInvert = false;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
/**
|
|||
|
|
* Condition testing if object is child of specified class.
|
|||
|
|
*/
|
|||
|
|
USTRUCT()
|
|||
|
|
struct STATETREEMODULE_API FStateTreeObjectIsChildOfClassConditionInstanceData
|
|||
|
|
{
|
|||
|
|
GENERATED_BODY()
|
|||
|
|
|
|||
|
|
UPROPERTY(EditAnywhere, Category = Input)
|
|||
|
|
TObjectPtr<UObject> Object = nullptr;
|
|||
|
|
|
|||
|
|
UPROPERTY(EditAnywhere, Category = Parameter)
|
|||
|
|
TObjectPtr<UClass> Class = nullptr;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
USTRUCT(DisplayName="Object Class Is")
|
|||
|
|
struct STATETREEMODULE_API FStateTreeObjectIsChildOfClassCondition : public FStateTreeConditionCommonBase
|
|||
|
|
{
|
|||
|
|
GENERATED_BODY()
|
|||
|
|
|
|||
|
|
typedef FStateTreeObjectIsChildOfClassConditionInstanceData InstanceDataType;
|
|||
|
|
|
|||
|
|
FStateTreeObjectIsChildOfClassCondition() = default;
|
|||
|
|
explicit FStateTreeObjectIsChildOfClassCondition(const EStateTreeCompare InInverts)
|
|||
|
|
: bInvert(InInverts == EStateTreeCompare::Invert)
|
|||
|
|
{}
|
|||
|
|
|
|||
|
|
virtual const UStruct* GetInstanceDataType() const override { return InstanceDataType::StaticStruct(); }
|
|||
|
|
virtual bool TestCondition(FStateTreeExecutionContext& Context) const override;
|
|||
|
|
|
|||
|
|
UPROPERTY(EditAnywhere, Category = Parameter)
|
|||
|
|
bool bInvert = false;
|
|||
|
|
};
|