34 lines
1.0 KiB
C#
34 lines
1.0 KiB
C#
using UnityEngine;
|
|
using UnityEngine.SceneManagement;
|
|
|
|
namespace Cielonos.MainGame
|
|
{
|
|
public partial class SceneSubmodule : SubmoduleBase<MainGameManager>
|
|
{
|
|
public CityArenaBeginningProcessor cityArenaBeginningProcessor;
|
|
|
|
public SceneSubmodule(MainGameManager owner) : base(owner)
|
|
{
|
|
cityArenaBeginningProcessor = new CityArenaBeginningProcessor();
|
|
}
|
|
}
|
|
|
|
public partial class SceneSubmodule
|
|
{
|
|
public enum SceneType
|
|
{
|
|
Fortress,
|
|
CityArena,
|
|
}
|
|
|
|
public SceneType CurrentGameScene => SceneManager.GetActiveScene().name switch
|
|
{
|
|
"Fortress" => SceneType.Fortress,
|
|
"CityArena" => SceneType.CityArena,
|
|
_ => throw new System.Exception("Unknown scene name: " + SceneManager.GetActiveScene().name)
|
|
};
|
|
|
|
public bool IsFortress => CurrentGameScene == SceneType.Fortress;
|
|
public bool IsCityArena => CurrentGameScene == SceneType.CityArena;
|
|
}
|
|
} |