using Godot;
using System.Collections;
using System.Collections.Generic;
using Godot.Collections;

namespace Rokojori
{
  [GlobalClass,Tool]
  public partial class EatDaRichGame:Node
  {
    public enum State
    {
      Title,
      Intro,
      Playing,
      Outro
    }

    [Export]
    public State state = State.Title;

    public void SetState( State state )
    {
      this.state = state;

      this.ForEachInRoot<OnState>(
        ( sta )=>
        {
          if ( sta.state == this.state )
          {
            Action.Trigger( sta.action );
          }
        }
      );
    }

  }
}