修改节点的初始状态

This commit is contained in:
997146918 2025-09-24 13:48:09 +08:00
parent 5ddb1b45f9
commit 670905633d
8 changed files with 12 additions and 3 deletions

View File

@ -2,7 +2,7 @@
"BuildId": "37670630",
"Modules":
{
"ProjectFish": "UnrealEditor-ProjectFish.dll",
"ProjectFishEditor": "UnrealEditor-ProjectFishEditor.dll"
"ProjectFish": "UnrealEditor-ProjectFish-0003.dll",
"ProjectFishEditor": "UnrealEditor-ProjectFishEditor-0003.dll"
}
}

View File

@ -131,6 +131,7 @@ void UFishingMapSubSystem::GenerateNodes()
NewNode->LayerIndex = LayerIndex;
NewNode->IndexInLayer = 0;
NewNode->NodeType = EMapNodeType::Boss;
NewNode->NodeState = EMapNodeState::Immovable;
AllNodes.Add(NewNode);
AllLayers[LayerIndex].AddNode(NewNode);
}
@ -145,7 +146,15 @@ void UFishingMapSubSystem::GenerateNodes()
UFishingMapNode* NewNode = NewObject<UFishingMapNode>(this);
NewNode->LayerIndex = LayerIndex;
NewNode->IndexInLayer = NodeIndex;
//只有第一层的节点 默认是可用状态
if (LayerIndex == 0)
{
NewNode->NodeState = EMapNodeState::Moveable;
}
else
{
NewNode->NodeState = EMapNodeState::Immovable;
}
// 随机节点类型
NewNode->RandomNodeType();
AllNodes.Add(NewNode);