// Copyright © Gamesmiths Guild. using Godot; using Godot.Collections; namespace Gamesmiths.Forge.Godot.Resources.Statescript; /// /// The type of a Statescript node. /// public enum StatescriptNodeType { /// /// Entry node: single output port. One per graph, cannot be removed. Color: Blue. /// Entry = 0, /// /// Exit node: single input port. Optional, can have multiple. Color: Blue. /// Exit = 1, /// /// Action node: one input, one output. Executes an instant action. Color: Green. /// Action = 2, /// /// Condition node: one input, two outputs (true/false). Color: Yellow. /// Condition = 3, /// /// State node: two inputs (input/abort), multiple outputs (OnActivate, OnDeactivate, OnAbort, Subgraph, + /// custom). Color: Red. /// State = 4, } /// /// Resource representing a single node within a Statescript graph. /// [Tool] public partial class StatescriptNode : Resource { /// /// Gets or sets the unique identifier for this node within the graph. /// [Export] public string NodeId { get; set; } = string.Empty; /// /// Gets or sets the display title for this node. /// [Export] public string Title { get; set; } = string.Empty; /// /// Gets or sets the type of this node. /// [Export] public StatescriptNodeType NodeType { get; set; } /// /// Gets or sets the fully qualified runtime type name of the concrete node class from the Forge library. /// Empty for Entry and Exit nodes which are handled specially. /// [Export] public string RuntimeTypeName { get; set; } = string.Empty; /// /// Gets or sets the position of this node in the graph editor. /// [Export] public Vector2 PositionOffset { get; set; } /// /// Gets or sets additional custom data for extended node implementations. /// /// /// Keys are constructor parameter names; values are the serialized parameter values. /// [Export] public Dictionary CustomData { get; set; } = []; /// /// Gets or sets the property bindings for this node's input properties and output variables. /// [Export] public Array PropertyBindings { get; set; } = []; }