public override void Init(int id) { base.Init(id); if (!scannerStepPassOnce || FinchCalibration.Settings.Rescanning) { firstScanEndTime = Time.time + ScannerTime; FinchCore.StartScan(ScannerType, (uint)(internalScannerTime * 1000.0f), (sbyte)thressholdRssi, true); UpdateScannerState(); UpdateWarnings(); } else { PlayableSet.RememberNodes(); NextStep(); } }
protected void TryLoadNextStep() { int upperArmsCount = FinchCore.NodesState.GetUpperArmCount(); int controllersCount = FinchCore.NodesState.GetControllersCount(); bool skipDueCorrectSet = (FinchCore.Settings.ControllerType == FinchControllerType.Shift ? upperArmsCount + controllersCount == 4 : controllersCount == 2); bool skipDuePress = false; bool isShift = FinchCore.Settings.ControllerType == FinchControllerType.Shift; foreach (FinchControllerElement i in (FinchControllerElement[])Enum.GetValues(typeof(FinchControllerElement))) { bool enoughPressing = Math.Max(FinchController.Left.GetPressTime(i), FinchController.Right.GetPressTime(i)) > FinchCalibration.Settings.TimePressingToCallCalibration; bool isPressing = FinchController.GetPressDown(FinchChirality.Any, i); skipDuePress |= i != FinchControllerElement.Touch && (isShift ? isPressing : enoughPressing); } if (skipDueCorrectSet || skipDuePress) { PlayableSet.RememberNodes(); scannerStepPassOnce = true; NextStep(); } }