Example #1
0
        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);
        }
Example #3
0
 public LoadMapSectionCommandData(SerializationInfo info, StreamingContext context)
 {
     sectionIndex   = info.GetUInt32("sectionIndex");
     mapCommandData = (LoadMapCommandData)info.GetValue("mapCommandData", typeof(LoadMapCommandData));
 }
Example #4
0
 public LoadMapSectionCommandData(uint sectionIndex, LoadMapCommandData mapCommandData)
 {
     this.sectionIndex   = sectionIndex;
     this.mapCommandData = mapCommandData;
 }