// ReSharper disable once CheckNamespace namespace GodotStateCharts { using System; using Godot; /// /// Wrapper around the compound state node. /// public class CompoundState : StateChartState { /// /// Called when a child state is entered. /// public event Action ChildStateEntered { add => Wrapped.Connect(SignalName.ChildStateEntered, Callable.From(value)); remove => Wrapped.Disconnect(SignalName.ChildStateEntered, Callable.From(value)); } /// /// Called when a child state is exited. /// public event Action ChildStateExited { add => Wrapped.Connect(SignalName.ChildStateExited, Callable.From(value)); remove => Wrapped.Disconnect(SignalName.ChildStateExited, Callable.From(value)); } private CompoundState(Node wrapped) : base(wrapped) { } /// /// Creates a wrapper object around the given node and verifies that the node /// is actually a compound state. The wrapper object can then be used to interact /// with the compound state chart from C#. /// /// the node that is the state /// a State wrapper. /// ArgumentException if the node is not a state. public new static CompoundState Of(Node state) { if (state.GetScript().As