void HandleHaywires() { if (finishState == null) { secondsToNextHaywire -= Time.deltaTime; if (secondsToNextHaywire <= 0) { activeHaywires = new HaywireCollection(haywireCount, activeHaywires?.GetAllActiveHaywires()); player.SetHaywires(activeHaywires); haywireSound.Play(); secondsToNextHaywire = haywireTime; } secondsToNextHaywireIncrease -= Time.deltaTime; if (secondsToNextHaywireIncrease <= 0) { if (haywireCount < 3) { ++haywireCount; } secondsToNextHaywireIncrease = secondsBetweenHaywireIncreases; } } else { activeHaywires = new HaywireCollection(0); player.SetHaywires(activeHaywires); } }
public void SetHaywires(HaywireCollection h) { haywires = h; }