更新新手引导逻辑
This commit is contained in:
parent
9711095c25
commit
d5b1e8b304
Binary file not shown.
Binary file not shown.
BIN
ProjectFish/Content/DataAssets/Dialogue/Dialogue_Battle.uasset
Normal file
BIN
ProjectFish/Content/DataAssets/Dialogue/Dialogue_Battle.uasset
Normal file
Binary file not shown.
Binary file not shown.
BIN
ProjectFish/Content/DataAssets/Fish/Fish_Tutorial2.uasset
Normal file
BIN
ProjectFish/Content/DataAssets/Fish/Fish_Tutorial2.uasset
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
ProjectFish/Content/Textures/FishingRewards/MagicBook.uasset
Normal file
BIN
ProjectFish/Content/Textures/FishingRewards/MagicBook.uasset
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -2,3 +2,15 @@
|
||||
|
||||
|
||||
#include "PlayerInfoSaveGame.h"
|
||||
|
||||
#include "ProjectFish/Gameplay/Subsystem/GameInfoManager.h"
|
||||
|
||||
void UPlayerInfoSaveGame::SetShipContainerItems(TArray<FContainerItemSaveData> NewItems)
|
||||
{
|
||||
ShipContainerItems = NewItems;
|
||||
if (GetWorld())
|
||||
{
|
||||
GetWorld()->GetGameInstance()->GetSubsystem<UGameInfoManager>()->SaveGameInfo();
|
||||
OnShipContainerUpdate.Broadcast();
|
||||
}
|
||||
}
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
#include "ProjectFish/Quest/QuestTypes.h"
|
||||
#include "PlayerInfoSaveGame.generated.h"
|
||||
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnShipContainerUpdate);
|
||||
/**
|
||||
*
|
||||
*/
|
||||
@ -31,7 +32,7 @@ public:
|
||||
FPrimaryAssetId ShipContainerShapeID;
|
||||
|
||||
// 船舱物品存档数据
|
||||
UPROPERTY(SaveGame, BlueprintReadWrite, meta = (ToolTip = "船舱物品数据"))
|
||||
UPROPERTY(SaveGame, BlueprintReadOnly, meta = (ToolTip = "船舱物品数据"))
|
||||
TArray<FContainerItemSaveData> ShipContainerItems;
|
||||
|
||||
UPROPERTY(SaveGame, BlueprintReadWrite, meta = (ToolTip = "仓库资源"))
|
||||
@ -55,4 +56,11 @@ public:
|
||||
//已战胜的鱼
|
||||
UPROPERTY(SaveGame, BlueprintReadWrite, meta = (ToolTip = "被击败的鱼"))
|
||||
TArray<int32> Fish_defeated_IDS;
|
||||
|
||||
protected:
|
||||
UPROPERTY(BlueprintAssignable, Category = "PlayerInfoSaveGame")
|
||||
FOnShipContainerUpdate OnShipContainerUpdate;
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category= "PlayerInfoSaveGame")
|
||||
void SetShipContainerItems(TArray<FContainerItemSaveData> NewItems);
|
||||
};
|
||||
|
||||
@ -508,5 +508,9 @@ public:
|
||||
//控制ui的显示
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Tutorial Asset")
|
||||
TArray<FTutorialUIControlParam> UIControlParams;
|
||||
|
||||
//引导task
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Tutorial Asset")
|
||||
TSubclassOf<class UTutorialTask_Base> TutorialTaskClass;
|
||||
};
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
|
||||
#include "FishFunctionLibrary.h"
|
||||
|
||||
#include "EngineUtils.h"
|
||||
#include "Kismet/GameplayStatics.h"
|
||||
#include "ProjectFish/Data/ContainerInfo.h"
|
||||
|
||||
@ -25,3 +26,20 @@ int32 UFishFunctionLibrary::GetContainerItemHeight(const UObject* WorldContextOb
|
||||
{
|
||||
return ContainerItem.GetItemHeight();
|
||||
}
|
||||
|
||||
AActor* UFishFunctionLibrary::GetActorOfClass(const UObject* WorldContextObject, TSubclassOf<AActor> ActorClass)
|
||||
{
|
||||
if (ActorClass)
|
||||
{
|
||||
if (UWorld* World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull))
|
||||
{
|
||||
for (TActorIterator<AActor> It(World, ActorClass); It; ++It)
|
||||
{
|
||||
AActor* Actor = *It;
|
||||
return Actor;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@ -21,6 +21,9 @@ public:
|
||||
UFUNCTION(BlueprintPure, Category = "FishFunctionLibrary", meta=(WorldContext="WorldContextObject"))
|
||||
static int32 GetContainerItemWiidth(const UObject* WorldContextObject, FContainerItem ContainerItem);
|
||||
|
||||
UFUNCTION(BlueprintPure, Category = "FishFunctionLibrary", meta=(WorldContext="WorldContextObject"))
|
||||
static int32 GetContainerItemHeight(const UObject* WorldContextObject, FContainerItem ContainerItem);
|
||||
UFUNCTION(BlueprintPure, Category = "FishFunctionLibrary", meta=(WorldContext="WorldContextObject"))
|
||||
static int32 GetContainerItemHeight(const UObject* WorldContextObject, FContainerItem ContainerItem);
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category="Actor")
|
||||
static AActor* GetActorOfClass(const UObject* WorldContextObject, TSubclassOf<AActor> ActorClass);
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user