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();
     }
 }
Example #2
0
 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();
     }
 }
Example #3
0
 private void DownButton_Pressed(object sender, KeypadButtonEventArgs e)
 {
     Down();
 }
Example #4
0
 private void UpButton_Pressed(object sender, KeypadButtonEventArgs e)
 {
     Up();
 }