private void OnEnable() { if (_dispatcher == null) { _dispatcher = EventsDispatcher.Load(); } }
//---------------------------------------------------------------------------------------------------------- #region Unity callbacks protected void Awake() { _dispatcher = EventsDispatcher.Load(); UiButton = new UITextMeshImage( GetComponentInChildren <TMP_Text>(), GetComponent <Image>()); }
public AsyncEventsController( EventsDispatcher<GuidEvent> guidEventsDispather, EventsDispatcher<ServerEvent> serverEventsDispather) { _guidEventsDispather = guidEventsDispather; _serverEventsDispather = serverEventsDispather; }
public TasksController( EventsDispatcher<GuidEvent> guidEventsDispather, EventsDispatcher<ServerEvent> serverEventsDispather) { _guidEventsBuilder = guidEventsDispather.Events; _serverEventsBuilder = serverEventsDispather.Events; }
void Awake() { Camera = Camera.main; TileMap = GetComponentInChildren <Tilemap>(); Dispatcher = EventsDispatcher.Load(); Input = GetComponent <IMouseInput>(); Input.OnPointerClick += OnPointerClick; }
public virtual void Setup() { Parameters = GameParameters.Load(); Dispatcher = EventsDispatcher.Load(); GameData = GameData.Load(); Dispatcher.AddListener(this); Controller = new GameObject("MockFsmController").AddComponent <MockFsmController>(); Controller.Awake(); GameData.Initialize(Controller); }
void Awake() { if (_gameData == null) { _gameData = GameData.Load(); } if (_dispatcher == null) { _dispatcher = EventsDispatcher.Load(); } }
private void Awake() { if (_gameData == null) { _gameData = GameData.Load(); } if (_dispatcher == null) { _dispatcher = EventsDispatcher.Load(); } if (_gameParameters == null) { _gameParameters = GameParameters.Load(); } }
/// <summary> /// This maps the default support for the event types. /// </summary> protected override void SupportLoadDefault() { SupportAdd(DataCollectionSupport.Boundary, (e) => EventsBoundary.Add(e)); SupportAdd(DataCollectionSupport.Dispatcher, (e) => EventsDispatcher.Add(e)); SupportAdd(DataCollectionSupport.EventSource, (e) => EventsEventSource.Add(e)); SupportAdd(DataCollectionSupport.Logger, (e) => EventsLog.Add(e)); SupportAdd(DataCollectionSupport.Statistics, (e) => EventsMicroservice.Add(e)); SupportAdd(DataCollectionSupport.Telemetry, (e) => EventsMetric.Add(e)); SupportAdd(DataCollectionSupport.Resource, (e) => EventsResource.Add(e)); SupportAdd(DataCollectionSupport.Custom, (e) => EventsCustom.Add(e)); SupportAdd(DataCollectionSupport.Security, (e) => EventsSecurity.Add(e)); }
public virtual void Setup() { Parameters = GameParameters.Load(); Dispatcher = EventsDispatcher.Load(); GameData = GameData.Load(); Dispatcher.AddListener(this); Controller = new GameObject("MockFsmController").AddComponent <MockFsmController>(); Controller.Awake(); var localPlayerSeat = Parameters.Profiles.localPlayer.seat; var remotePlayerSeat = Parameters.Profiles.remotePlayer.seat; var localPlayer = new Player(0, localPlayerSeat, Parameters, Dispatcher); var remotePlayer = new Player(1, remotePlayerSeat, Parameters, Dispatcher); GameData.CreateGame(Controller, localPlayer, remotePlayer); }
private static void InitEventsDispatcher(IApplicationSettings applicationSettings, ILog logger) { var endpoint = GetEventStoreEndpoint(applicationSettings); var connection = EventStoreConnection.Create(endpoint); connection.ConnectAsync().Wait(); _dispatcher = new EventsDispatcher(logger, applicationSettings); // use MongoDB for the read model var factory = new MongoDbAtomicWriterFactory(applicationSettings.MongoDbConnectionString, applicationSettings.MongoDbName); // if you want to use SQL Server for the read model then use this factory instead //var factory = new SqlServerAtomicWriterFactory(applicationSettings.SqlServerConnectionString); // if you want to use ElasticSearch for the read model then use this factory instead //var factory = new ElasticSearchAtomicWriterFactory(applicationSettings.ElasticSearchBaseUrl); var observers = new ObserverRegistry().GetObservers(factory); _dispatcher.Start(connection, observers); }
/// <summary> Add itself as a listener. </summary> protected override void Awake() { base.Awake(); Dispatcher = EventsDispatcher.Load(); Subscribe(); }
public void LoadDispatcher() => Assert.IsTrue(EventsDispatcher.Load() != null);
private void Awake() { _gameController = GetComponent <GameController>(); _dispatcher = EventsDispatcher.Load(); _gameParameters = GameParameters.Load(); }
public void Awake() { _gameData = GameData.Load(); _dispatcher = EventsDispatcher.Load(); }