PopTheLockClone/GameManager.cs
Bobby Lucero c3323fb6dd Initial Commit
Didn't use git for a minute, oh well.
2025-06-05 00:32:29 -04:00

41 lines
707 B
C#

using Godot;
using System;
public partial class GameManager : Node
{
public enum State
{
IDLE,
PLAY,
LOSS,
WIN
}
public bool playing = false;
public static State CurrentState { get; private set; }
public override void _Ready()
{
CurrentState = State.IDLE;
}
public override void _Process(double delta)
{
if (Input.IsActionJustPressed("Press"))
{
playing = !playing;
if (playing)
{
CurrentState = State.PLAY;
}
else
{
CurrentState = State.IDLE;
}
}
}
}