예제 #1
0
    public void StartRound()
    {
        phase = RoundPhase.InProgress;
        OnPhaseChanged.Invoke(this);

        StartCoroutine(DecayIsland(map.Island));
    }
예제 #2
0
        public void Reset()
        {
            _phaseIndex        = 0;
            _possibleRotations = _rotations;

            OnPhaseChanged?.Invoke(_possibleRotations.First());
            OnPhaseDecisionRequired?.Invoke(GetPossiblePhases(), PhaseSameAttackStyle);
        }
예제 #3
0
    public void Initialize(Map map, List <Unit> units)
    {
        allUnits = new List <Unit>(units);
        this.map = map;

        phase = RoundPhase.PreRound;
        OnPhaseChanged.Invoke(this);

        map.SetIslandRadius(25f);    // TODO: data driven
        PrepUnits();
        map.Lava.Clear();
    }
예제 #4
0
        public void NextPhase()
        {
            if (!PhaseDecisionRequired)
            {
                IncreasePhaseIndex();

                var phase = _possibleRotations.First();
                OnPhaseChanged?.Invoke(phase);
            }
            else
            {
                OnPhaseDecisionRequired?.Invoke(GetPossiblePhases(), PhaseSameAttackStyle);
            }
        }
예제 #5
0
        public void NextPhaseByStyle(StyleType bossStyle)
        {
            if (PhaseDecisionRequired)
            {
                var tempRotations = _possibleRotations.Where(r => r.NextPhase.Style == bossStyle).ToList();

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

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