riversong code showcase
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
using Cysharp.Threading.Tasks;
|
||||
using IServiceProvider = DanieleMarotta.RiversongCodeShowcase.IServiceProvider;
|
||||
|
||||
namespace DanieleMarotta.RiversongCodeShowcase
|
||||
{
|
||||
[GameSystemGroup(typeof(CommonServicesSystemGroup))]
|
||||
[InitializeAfter(typeof(CommonServicesSystem))]
|
||||
public class AnalyticsInitializationSystem : GameSystem, IServiceProvider, IInitializable
|
||||
{
|
||||
private IAnalyticsService _analyticsService;
|
||||
|
||||
public AnalyticsInitializationSystem(IServiceLocator serviceLocator) : base(serviceLocator)
|
||||
{
|
||||
}
|
||||
|
||||
public void RegisterServices(IServiceLocator serviceLocator)
|
||||
{
|
||||
_analyticsService = AnalyticsServiceFactory.Create();
|
||||
serviceLocator.RegisterService(_analyticsService);
|
||||
}
|
||||
|
||||
public async UniTask InitializeAsync()
|
||||
{
|
||||
await _analyticsService.InitializeAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user