private void Connector_ButtonPressed(object sender, KeypadButtonEventArgs e) { if (this.Solved || !this.Connector.InputValid) { return; } if (e.ButtonIndex == this.correctButton) { this.Log("You pressed {0}. That was correct.", this.DescribeButton(e.ButtonIndex)); this.Disarm(); } else { this.Log("You pressed {0}. That was incorrect: the correct button is {1}.", this.DescribeButton(e.ButtonIndex), this.DescribeButton(this.correctButton)); this.Connector.KMBombModule.HandleStrike(); this.Connector.AnimateButtons(); } }
private void Connector_ButtonPressed(object sender, KeypadButtonEventArgs e) { if (_completedStages >= 3) { // strike when pressing a button after a solve, like in vanilla. Even the correct button strikes. Connector.KMBombModule.HandleStrike(); Log("Strike!"); return; } if (!_activated) { return; } if (_solution == e.ButtonIndex) { // correct Log("Pressed {0}. Correct!", _buttonLabels[e.ButtonIndex]); _completedStages++; Connector.Stage = _completedStages; if (_completedStages >= 3) { Disarm(); } else { Connector.AnimateButtons(); } } else { // wrong Log("Pressed {0}. Strike!", _buttonLabels[e.ButtonIndex]); Connector.KMBombModule.HandleStrike(); Connector.AnimateButtons(); } }
private void DownButton_Pressed(object sender, KeypadButtonEventArgs e) { Down(); }
private void UpButton_Pressed(object sender, KeypadButtonEventArgs e) { Up(); }