public void StartRound() { phase = RoundPhase.InProgress; OnPhaseChanged.Invoke(this); StartCoroutine(DecayIsland(map.Island)); }
public void Reset() { _phaseIndex = 0; _possibleRotations = _rotations; OnPhaseChanged?.Invoke(_possibleRotations.First()); OnPhaseDecisionRequired?.Invoke(GetPossiblePhases(), PhaseSameAttackStyle); }
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(); }
public void NextPhase() { if (!PhaseDecisionRequired) { IncreasePhaseIndex(); var phase = _possibleRotations.First(); OnPhaseChanged?.Invoke(phase); } else { OnPhaseDecisionRequired?.Invoke(GetPossiblePhases(), PhaseSameAttackStyle); } }
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); } } }