调整节点状态逻辑
This commit is contained in:
parent
b50712416a
commit
b6b7f2a411
BIN
ProjectFish/Binaries/Win64/UnrealEditor-ProjectFish-0001.dll
Normal file
BIN
ProjectFish/Binaries/Win64/UnrealEditor-ProjectFish-0001.dll
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -2,7 +2,7 @@
|
||||
"BuildId": "37670630",
|
||||
"Modules":
|
||||
{
|
||||
"ProjectFish": "UnrealEditor-ProjectFish.dll",
|
||||
"ProjectFishEditor": "UnrealEditor-ProjectFishEditor.dll"
|
||||
"ProjectFish": "UnrealEditor-ProjectFish-0001.dll",
|
||||
"ProjectFishEditor": "UnrealEditor-ProjectFishEditor-0001.dll"
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -58,7 +58,7 @@ int32 UFishingMapSystem::GetNodeAtLayerIndex(FGuid NodeID) const
|
||||
return -1;
|
||||
}
|
||||
|
||||
TObjectPtr<UFishingMapNode> UFishingMapSystem::GetNode(FGuid NodeID)
|
||||
UFishingMapNode* UFishingMapSystem::GetNode(FGuid NodeID)
|
||||
{
|
||||
for (auto node: AllNodes)
|
||||
{
|
||||
@ -84,7 +84,7 @@ void UFishingMapSystem::MoveToNode(FGuid NodeID)
|
||||
if (MoveableNodeIDs.Find(node->NodeID) == -1)
|
||||
{
|
||||
//节点不在可移动的列表内,更新状态
|
||||
OnNodeStateChange.Broadcast(EMapNodeState::Immovable);
|
||||
OnNodeStateChange.Broadcast(node->NodeID, EMapNodeState::Immovable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
#include "ProjectFish/Definations.h"
|
||||
#include "FishingMapSystem.generated.h"
|
||||
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnNodeStateChange, EMapNodeState, NewState);
|
||||
DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnNodeStateChange, FGuid, NodeID, EMapNodeState, NewState);
|
||||
|
||||
// 简化的地图节点
|
||||
UCLASS(BlueprintType)
|
||||
@ -80,7 +80,8 @@ public:
|
||||
UFUNCTION(BlueprintPure, Category = "FishingMap")
|
||||
int32 GetNodeAtLayerIndex(FGuid NodeID) const;
|
||||
|
||||
TObjectPtr<UFishingMapNode> GetNode(FGuid NodeID) ;
|
||||
UFUNCTION(BlueprintPure, Category = "FishingMap")
|
||||
class UFishingMapNode* GetNode(FGuid NodeID) ;
|
||||
|
||||
// 清空地图
|
||||
UFUNCTION(BlueprintCallable, Category = "FishingMap")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user