Ejemplo n.º 1
0
    void RegisterAllService(ServiceLocate locate)
    {
        locate.RegisterService <LoaderService>();
        locate.RegisterService <TimerService>();
        var service   = locate.RegisterService <UIService>();
        var uiContext = new UiServiceContext(_facade);

        service.SetContext(uiContext);
    }
Ejemplo n.º 2
0
 void Awake()
 {
     Debuger.Init();
     _facade        = Facade.CreateFacade();
     _locate        = new ServiceLocate(_facade);
     _facade.Locate = _locate;
     RegisterAllService(_locate);
     _locate.CreateAllServices();
     gameObject.AddComponent <GameLogicManager>();
 }