public void Sim200ms(float dt) { if (!(GameClock.Instance.GetTime() / 600f < TuningData <Tuning> .Get().cyclesBeforeFirstGreeting)) { for (int num = activeSetups.Count - 1; num >= 0; num--) { GreetingSetup greetingSetup = activeSetups[num]; if (!ValidNavigatingMinion(greetingSetup.A.minion) || !ValidOppositionalMinion(greetingSetup.A.minion, greetingSetup.B.minion)) { greetingSetup.A.reactable.Cleanup(); greetingSetup.B.reactable.Cleanup(); activeSetups.RemoveAt(num); } } candidateCells.Clear(); foreach (MinionIdentity item in Components.LiveMinionIdentities.Items) { if ((!cooldowns.ContainsKey(item) || !(GameClock.Instance.GetTime() - cooldowns[item] < 720f * TuningData <Tuning> .Get().greetingDelayMultiplier)) && ValidNavigatingMinion(item)) { for (int i = 0; i <= 2; i++) { int offsetCell = GetOffsetCell(item, i); if (candidateCells.ContainsKey(offsetCell) && ValidOppositionalMinion(item, candidateCells[offsetCell])) { BeginNewGreeting(item, candidateCells[offsetCell], offsetCell); break; } candidateCells[offsetCell] = item; } } } } }
private void BeginNewGreeting(MinionIdentity minion_a, MinionIdentity minion_b, int cell) { GreetingSetup greetingSetup = new GreetingSetup(); greetingSetup.cell = cell; greetingSetup.A = new GreetingUnit(minion_a, GetReactable(minion_a)); greetingSetup.B = new GreetingUnit(minion_b, GetReactable(minion_b)); activeSetups.Add(greetingSetup); }