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

Binary file not shown.

Binary file not shown.

View File

@@ -73,6 +73,17 @@ AActor* UOSBlueprintFunctionLibrary::GetNearestActor(TArray<AActor*> Actors, AAc
return NearestActor; 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) UENUM(BlueprintType)//这里的UENUM是ue内部用的枚举类型就和创建成员和函数用的UPR和UFUN一样
enum class EBlueprintExecNodePin : uint8 enum AddorSub//正常的枚举就可以了,记住自己枚举的命名
{ {
False1, Add,//我这里是创建了2个可以创建多个
True1 Sub,
None
}; };
@@ -32,6 +33,12 @@ class TG_ARPG_API UOSBlueprintFunctionLibrary : public UBlueprintFunctionLibrary
// //
UFUNCTION(BlueprintCallable,Category="OSBlueprintFunctionLibrary") UFUNCTION(BlueprintCallable,Category="OSBlueprintFunctionLibrary")
static AActor* GetNearestActor(TArray<AActor*> Actors, AActor* SelfActor, AActor* LastNearestActor,bool& bIsNeedUpdate); 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);
}; };