mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:25:35 +00:00
40 lines
No EOL
925 B
C#
40 lines
No EOL
925 B
C#
using Cirno.Scripts.Enums;
|
|
using Cirno.Scripts.Resources;
|
|
using Godot;
|
|
|
|
namespace Cirno.Scripts.UI;
|
|
|
|
public partial class DifficultyMenu : MenuBase
|
|
{
|
|
[Export] public MapResource StartMap { get; private set; }
|
|
|
|
private void StartEasy()
|
|
{
|
|
StartGame(DifficultyLevel.Easy);
|
|
}
|
|
|
|
private void StartNormal()
|
|
{
|
|
StartGame(DifficultyLevel.Normal);
|
|
}
|
|
|
|
private void StartHard()
|
|
{
|
|
StartGame(DifficultyLevel.Hard);
|
|
}
|
|
|
|
private void StartLunatic()
|
|
{
|
|
StartGame(DifficultyLevel.Lunatic);
|
|
}
|
|
|
|
public void StartGame(DifficultyLevel difficultyLevel)
|
|
{
|
|
if (StartMap is null) return;
|
|
GlobalState.Session.NewSession();
|
|
GlobalState.Session.AllowSaving = true;
|
|
GlobalState.Session.Difficulty = difficultyLevel;
|
|
GlobalState.Session.GameMode = GameMode.Game;
|
|
GlobalState.Instance.GotoScene(StartMap);
|
|
}
|
|
} |