Exemplo n.º 1
0
        public Phase NextPhase(BossLocationType phaseChosen)
        {
            CurrentPhase = PossiblePhases(phaseChosen).Single();

            PhaseDescisionInputRequired = false;

            return(CurrentPhase);
        }
Exemplo n.º 2
0
        public List <Phase> PossiblePhases(BossLocationType bossLocation)
        {
            PossibleRotations = PossibleRotations.Where(r => r.Phases[_phaseIndex].BossLocation == bossLocation).ToList();

            //Get only distinct phases (otherwise you'd get two melee phases with same positioning for first round).
            var result = PossibleRotations.Select(p => p.Phases[_phaseIndex + 1])
                         .GroupBy(p => new { p.BossLocation, p.Style })
                         .Select(p => p.First()).ToList();

            _phaseIndex++;

            PhaseSameAttackStyle = result.Count != result.GroupBy(s => s.Style).Count();

            return(result);
        }
Exemplo n.º 3
0
        public void NextPhaseByLocation(BossLocationType bossLocation)
        {
            if (PhaseDecisionRequired)
            {
                var tempRotations = _possibleRotations.Where(r => r.NextPhase.BossLocation == bossLocation).ToList();

                if (tempRotations.Count != 0)
                {
                    _possibleRotations = tempRotations;
                }

                var phases = GetPossiblePhases();

                if (phases.Count == 1)
                {
                    IncreasePhaseIndex();
                    OnPhaseChanged?.Invoke(_possibleRotations.First());
                }
                else
                {
                    OnPhaseDecisionRequired?.Invoke(phases, PhaseSameAttackStyle);
                }
            }
        }