@@ -7,10 +7,22 @@ namespace __TEMPLATE__;
77
88public partial class Game
99{
10- private static GameServices ? _services ;
10+ public static GameComponentManager ComponentManager => RuntimeServices . ComponentManager ;
11+ public static GameConsole Console => RuntimeServices . GameConsole ;
1112
12- private static GameServices RuntimeServices =>
13- _services ?? throw new InvalidOperationException ( "Game services are not initialized yet." ) ;
13+ public static IAudioService Audio => RuntimeServices . Audio ;
14+ public static IOptionsService Options => RuntimeServices . Options ;
15+ public static IMetricsOverlay Metrics => RuntimeServices . Metrics ;
16+ public static ISceneService Scene => RuntimeServices . Scene ;
17+
18+ public static Profiler Profiler => RuntimeServices . Profiler ;
19+ public static Services Services => RuntimeServices . ScopedServices ;
20+
21+ public static FocusOutlineManager FocusOutline => RuntimeServices . FocusOutline ;
22+
23+ public static ILoggerService Logger => RuntimeServices . Logger ;
24+
25+ public static IApplicationLifetime Application => RuntimeServices . ApplicationLifetime ;
1426
1527 internal static void Initialize ( GameServices services )
1628 {
@@ -34,30 +46,8 @@ internal static void Reset()
3446 _services = null ;
3547 }
3648
37- public static GameComponentManager ComponentManager => RuntimeServices . ComponentManager ;
38- public static GameConsole Console => RuntimeServices . GameConsole ;
39- public static GameConsole GameConsole => RuntimeServices . GameConsole ;
40-
41- public static IAudioService Audio => RuntimeServices . Audio ;
42- public static AudioManager AudioManager => RuntimeServices . AudioManager ;
43-
44- public static IOptionsService Options => RuntimeServices . Options ;
45- public static OptionsManager OptionsManager => RuntimeServices . OptionsManager ;
46- public static OptionsSettings Settings => RuntimeServices . Options . Settings ;
47-
48- public static IMetricsOverlay Metrics => RuntimeServices . Metrics ;
49-
50- public static ISceneService Scene => RuntimeServices . Scene ;
51- public static SceneManager SceneManager => RuntimeServices . SceneManager ;
52-
53- public static Profiler Profiler => RuntimeServices . Profiler ;
54- public static Services Services => RuntimeServices . ScopedServices ;
55- public static Services ScopedServices => RuntimeServices . ScopedServices ;
56-
57- public static FocusOutlineManager FocusOutline => RuntimeServices . FocusOutline ;
58-
59- public static ILoggerService Logger => RuntimeServices . Logger ;
60- public static Logger LoggerManager => RuntimeServices . LoggerManager ;
49+ private static GameServices ? _services ;
6150
62- public static IApplicationLifetime Application => RuntimeServices . ApplicationLifetime ;
51+ private static GameServices RuntimeServices =>
52+ _services ?? throw new InvalidOperationException ( "Game services are not initialized yet." ) ;
6353}
0 commit comments