Table of Contents

Class Node

Namespace
DialogueDown.Playbook.Nodes
Assembly
DialogueDown.Playbook.dll

One step of a playthrough: something happens here, then an edge leads on.

[JsonPolymorphic(TypeDiscriminatorPropertyName = "kind")]
[JsonDerivedType(typeof(LineNode), "line")]
[JsonDerivedType(typeof(ChoiceNode), "choice")]
[JsonDerivedType(typeof(RandomChoiceNode), "random-choice")]
[JsonDerivedType(typeof(BranchNode), "branch")]
[JsonDerivedType(typeof(ControlNode), "control")]
[JsonDerivedType(typeof(EndNode), "end")]
[Equatable]
public abstract record Node : IEquatable<Node>
Inheritance
Node
Implements
Derived
Inherited Members

Remarks

Every node has an identity and its ways out, so the base carries both. Field order is stated rather than inherited, because a serializer writes a derived type's own properties before its base's.

Properties

Id

Gets this node's position in the playbook's node list, which its index must match.

Out

Gets the ways out of this node.

Methods

Equals(Node?)

Indicates whether the current object is equal to another object of the same type.

GetHashCode()

Serves as the default hash function.