This commit is contained in:
2023-09-20 16:05:53 +08:00
parent 9ff2f2013b
commit 5d1348519e
5 changed files with 22 additions and 4 deletions

View File

@@ -73,6 +73,17 @@ AActor* UOSBlueprintFunctionLibrary::GetNearestActor(TArray<AActor*> Actors, AAc
return NearestActor;
}
void UOSBlueprintFunctionLibrary::CompareMap(TMap<APlayerState*, int32> OldMap, TMap<APlayerState*, int32> NewMap,
TMap<APlayerState*, int32>& AddMap, TMap<APlayerState*, int32>& SubMap, TEnumAsByte<AddorSub>& Result)
{
}

View File

@@ -12,11 +12,12 @@
*
*/
//一个数据结构,用于储存一个数组的值用来做执行引脚
UENUM(BlueprintType)
enum class EBlueprintExecNodePin : uint8
UENUM(BlueprintType)//这里的UENUM是ue内部用的枚举类型就和创建成员和函数用的UPR和UFUN一样
enum AddorSub//正常的枚举就可以了,记住自己枚举的命名
{
False1,
True1
Add,//我这里是创建了2个可以创建多个
Sub,
None
};
@@ -32,6 +33,12 @@ class TG_ARPG_API UOSBlueprintFunctionLibrary : public UBlueprintFunctionLibrary
//
UFUNCTION(BlueprintCallable,Category="OSBlueprintFunctionLibrary")
static AActor* GetNearestActor(TArray<AActor*> Actors, AActor* SelfActor, AActor* LastNearestActor,bool& bIsNeedUpdate);
//输入两个map,key为playerstate,value为任何类型,将两个map的key对比,增加的和减少的分别放入两个map,并且返回执行引脚
UFUNCTION(BlueprintCallable, Category = "OSBlueprintFunctionLibrary", Meta = (ExpandEnumAsExecs = "Result"))
static void CompareMap(TMap<APlayerState*, int32> OldMap, TMap<APlayerState*, int32> NewMap, TMap<APlayerState*, int32>& AddMap, TMap<APlayerState*, int32>& SubMap, TEnumAsByte<AddorSub>& Result);
};