Beispiel #1
0
        public override void Run()
        {
            RConsole.RootConsole.SetForegroundColour(TCODColor.white);
            RConsole.RootConsole.PrintString(22, 52, "Select 2 Characters to switch.");

            var character = Model.BattleModel.FrontRow[Model.MenuModel.SelectedSwitchIndex];

            _drawer.DrawStats(character);
            _lister.Draw(character);
        }
Beispiel #2
0
        public override void Run()
        {
            Initialize();

            _root.Blit(_clearConsole, _clearConsole.Bounds, 4, 4);
            var redControl = _root.GetColorControlString(TCODColor.red);

            _root.PrintString(4, 4, "{0}Reserve Party{1}", redControl, _root.GetStopControl());

            var deadCount        = FrontRowSize - Model.Party.FrontRow.Count;
            var selectedFrontRow = Model.MenuModel.SelectedSwitchIndex;

            for (var i = FrontRowSize - deadCount; i < FrontRowSize; ++i)
            {
                _borderConsole.SetForegroundColour(selectedFrontRow == i ? TCODColor.red : TCODColor.white);
                _borderConsole.DrawBorder();
                _root.Blit(_borderConsole, _borderConsole.Bounds, StartX + ColOffset * i, 30);
            }

            var backSeat = Model.Party.BackSeat;

            for (var i = 0; i < backSeat.Count; ++i)
            {
                _frames[i].AssignCharacter(backSeat[i]);
                _frames[i].Draw();
            }

            ICharacter selectedCharacter = null;
            var        backRowSelected   = false;

            foreach (var character in backSeat.Where(character => character.IsMarked))
            {
                backRowSelected   = true;
                selectedCharacter = character;
                break;
            }

            if (!backRowSelected)
            {
                foreach (var character in Model.Party.FrontRow.Where(character => character.IsMarked))
                {
                    selectedCharacter = character;
                    break;
                }
            }

            if (selectedCharacter == null)
            {
                return;
            }

            _drawer.DrawStats(selectedCharacter);
            _lister.Draw(selectedCharacter);
        }