Exemplo n.º 1
0
 public void Init(IProvidersContainer providersContainer)
 {
     eventBus = providersContainer.GetProvider <IEventBus>();
     areaSizeChangedEventSubscritpion = eventBus.Subscribe <AreaSizeChangedEvent>(OnAreaSizeChanged);
     updateProvider = providersContainer.GetProvider <IUpdateProvider>();
     if (updateProvider != null)
     {
         updateProvider.OnLateUpdate += OnLateUpdate;
     }
 }
        public void Init(IProvidersContainer providersContainer)
        {
            Gates = new Tuple <IGate, IGate>(firstGate, secondGate);

            FieldInfo = new PingPongGameFieldInfo(centerTr.position);

            eventBus = providersContainer.GetProvider <IEventBus>();

            updateProvider           = providersContainer.GetProvider <IUpdateProvider>();
            updateProvider.OnUpdate += OnUpdate;

            InitWalls(providersContainer);
        }
Exemplo n.º 3
0
 public void Init(IProvidersContainer providersContainer)
 {
     eventBus = providersContainer.GetProvider <IEventBus>();
     areaSizeChangedEventSubscription = eventBus.Subscribe <AreaSizeChangedEvent>(OnAreaSizeChanged);
 }