Added the ability to disable combo action nodes. Enabling them will come later.
This commit is contained in:
parent
dcaac98f50
commit
7505a70575
@ -150,8 +150,12 @@ const UComboActionGraphNode *UComboManagerComponent::FindActiveNodeData(const UC
|
|||||||
{
|
{
|
||||||
if (ActionNode->GetComboInput() == Input && ActionNode->GetTriggerEvent() == EComboActionTriggerEvent::Activated)
|
if (ActionNode->GetComboInput() == Input && ActionNode->GetTriggerEvent() == EComboActionTriggerEvent::Activated)
|
||||||
{
|
{
|
||||||
ComboAction = ActionNode->GetComboAction();
|
// If we found the right node, only acknowledge it if it's enabled. Otherwise just skip it.
|
||||||
NextNode = ActionNode;
|
if (ActionNode->bEnabled)
|
||||||
|
{
|
||||||
|
ComboAction = ActionNode->GetComboAction();
|
||||||
|
NextNode = ActionNode;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,6 +19,7 @@ UComboActionGraphNode::UComboActionGraphNode()
|
|||||||
this->CompatibleGraphType = UComboActionGraph::StaticClass();
|
this->CompatibleGraphType = UComboActionGraph::StaticClass();
|
||||||
|
|
||||||
this->BackgroundColor = FLinearColor::Black;
|
this->BackgroundColor = FLinearColor::Black;
|
||||||
|
this->bEnabled = true;
|
||||||
|
|
||||||
this->bAllowInputNodes = true;
|
this->bAllowInputNodes = true;
|
||||||
this->bAllowOutputNodes = true;
|
this->bAllowOutputNodes = true;
|
||||||
|
|||||||
@ -81,21 +81,29 @@ protected:
|
|||||||
#pragma region Editable
|
#pragma region Editable
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
* The array of allowed input classes for this Dialogue Node.
|
* Whether the node is enabled by default. Disabled nodes will be ignored by the
|
||||||
*❗ Only nodes with classes from this array can be connected as inputs to this node.
|
* combo manager until they are enabled again programmatically. This allows actions
|
||||||
*❔ Can be used to restrict the types of inputs this node can accept.
|
* to be unlockable during gameplay.
|
||||||
*/
|
*/
|
||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category="Combo Input|Action")
|
UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category="Combo Input|Action")
|
||||||
TArray<TSubclassOf<class UComboActionGraphNode>> AllowedInputClasses;
|
uint8 bEnabled : 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The maximum number of children nodes that this node can have.
|
* The maximum number of children nodes that this node can have.
|
||||||
*❗ If this value is -1, then there is no limit on the number of children nodes.
|
* If this value is -1, then there is no limit on the number of children nodes.
|
||||||
*❔ Can be used to enforce a maximum number of connections for certain types of nodes.
|
* Can be used to enforce a maximum number of connections for certain types of nodes.
|
||||||
*/
|
*/
|
||||||
UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category="Combo Input|Action")
|
UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category="Combo Input|Action")
|
||||||
int32 MaxChildrenNodes = -1;
|
int32 MaxChildrenNodes = -1;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The array of allowed input classes for this Dialogue Node.
|
||||||
|
* Only nodes with classes from this array can be connected as inputs to this node.
|
||||||
|
* Can be used to restrict the types of inputs this node can accept.
|
||||||
|
*/
|
||||||
|
UPROPERTY(BlueprintReadOnly, Category="Combo Input|Action")
|
||||||
|
TArray<TSubclassOf<class UComboActionGraphNode>> AllowedInputClasses;
|
||||||
|
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
|
|
||||||
#pragma endregion
|
#pragma endregion
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user