第一次提交

This commit is contained in:
不明不惑
2026-03-03 01:23:02 +08:00
commit 3e434877e8
1053 changed files with 102411 additions and 0 deletions

View File

@@ -0,0 +1,51 @@
// Copyright 2025 https://yuewu.dev/en All Rights Reserved.
#pragma once
#include "CoreMinimal.h"
#include "GameplayTagContainer.h"
#include "GIS_DropperComponent.h"
#include "Items/GIS_ItemInfo.h"
#include "GIS_ItemDropperComponent.generated.h"
class UGIS_InventorySystemComponent;
UCLASS(ClassGroup=(GIS), meta=(BlueprintSpawnableComponent))
class GENERICINVENTORYSYSTEM_API UGIS_ItemDropperComponent : public UGIS_DropperComponent
{
GENERATED_BODY()
public:
/**
* Get the item infos of this dropper will drops.
* 获取要掉落的道具信息。
*/
UFUNCTION(BlueprintCallable, Category="GIS|Dropper")
TArray<FGIS_ItemInfo> GetItemsToDrop() const;
virtual void Drop() override;
protected:
virtual void BeginPlay() override;
virtual TArray<FGIS_ItemInfo> GetItemsToDropInternal() const;
virtual void DropItemsInternal(const TArray<FGIS_ItemInfo>& ItemInfos);
virtual void DropInventoryPickup(const TArray<FGIS_ItemInfo>& ItemInfos);
virtual void DropItemPickup(const FGIS_ItemInfo& ItemInfo);
/**
* Target collection to drop.
* 指定要掉落库存中的哪个集合里的道具.
*/
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Dropper", meta=(Categories="GIS.Collection"))
FGameplayTag CollectionTag;
/**
* If the drops is inventory pickup or item pickups?
* 指定以InventoryPickup的方式掉落还是以ItemPickup
*/
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category="Dropper")
bool bDropAsInventory{true};
};