example-grass/Eat Da Rich/EatDaRichGame.cs

38 lines
601 B
C#
Raw Normal View History

2025-07-22 14:08:35 +00:00
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 );
}
}
);
}
}
}