10 #include <Kismet/BlueprintFunctionLibrary.h>
11 #include "DrawLots.generated.h"
18 USTRUCT(BlueprintType)
28 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category =
"DrawLots", meta = (ClampMin =
"1"))
36 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category =
"DrawLots")
37 TObjectPtr<UObject> Item;
57 USTRUCT(BlueprintType)
67 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category =
"DrawLots")
68 TArray<FLotteryItem> LotteryItems;
75 UObject* Draw(
const bool consecutive)
const;
78 mutable int32 mLastLotteryNumber = -1;
88 USTRUCT(BlueprintType)
98 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category =
"DrawLots")
106 int32 Draw(
const bool consecutive)
const;
109 mutable int32 mLastLotteryNumber = -1;
117 UCLASS(Blueprintable)
134 UFUNCTION(BlueprintCallable, Category =
"DrawLots")
135 static UObject* DrawLotsObject(
const FDrawLotsObject& drawLotsObject,
const bool consecutive =
true)
137 return drawLotsObject.
Draw(consecutive);
151 UFUNCTION(BlueprintCallable, Category =
"DrawLots")
152 static int32 DrawLotsIndex(
const FDrawLotsIndex& drawLotsIndex,
const bool consecutive =
true)
154 return drawLotsIndex.Draw(consecutive);
Definition: DrawLots.h:119
Definition: DrawLots.h:90
Definition: DrawLots.h:59
UObject * Draw(const bool consecutive) const
Definition: DrawLots.cpp:12
Definition: DrawLots.h:20