public void Construct(IMapSectionContext mapSectionContext, IMapData mapData, IInputLock inputLock, LoadMapCommandData loadMapCommandData, ICommandQueue commandQueue) { _nextSectionButton.onClick.AddListener(HandleNextSectionButtonCLicked); _previousSectionButton.onClick.AddListener(HandlePreviousSectionButtonCLicked); _mapSectionContext = mapSectionContext; _loadMapCommandData = loadMapCommandData; _mapData = mapData; _inputLock = inputLock; _commandQueue = commandQueue; }
private void HandleLoadMapClicked(int mapIndex) { _mapSelectViewController.LoadMapClicked -= HandleLoadMapClicked; _replayLoaderViewController.LoadReplayClicked -= HandleLoadReplayClicked; _mapSelectViewController.Hide(); _replayLoaderViewController.Hide(); _encounterSelectionContext.EncounterType = EncounterType.Combat; LoadMapCommandData commandData = new LoadMapCommandData((uint)mapIndex); _commandQueue.Enqueue <LoadMapCommand, LoadMapCommandData>(commandData, CommandSource.Game); }
public LoadMapSectionCommandData(SerializationInfo info, StreamingContext context) { sectionIndex = info.GetUInt32("sectionIndex"); mapCommandData = (LoadMapCommandData)info.GetValue("mapCommandData", typeof(LoadMapCommandData)); }
public LoadMapSectionCommandData(uint sectionIndex, LoadMapCommandData mapCommandData) { this.sectionIndex = sectionIndex; this.mapCommandData = mapCommandData; }