private void DoClick(HUDKeypad source, HUDKeypad.HUDKeypadEventArgs args) { if (CharIndex >= 8) { return; } CharDisp[CharIndex].Character = args.Character; CharIndex++; if (CharIndex == 8) { var number = new string(Enumerable.Range(0, 8).Select(i => CharDisp[i].Character).ToArray()); if (__Secrets.TestUnlockCode(number)) { AddOperation(new UnlockSucessOperation()); } else { MainGame.Inst.GDSound.PlayEffectError(); AddOperation(new UnlockErrorOperation()); } } }
private void DoClick(HUDKeypad source, HUDKeypad.HUDKeypadEventArgs args) { if (CharIndex >= 8) { return; } CharDisp[CharIndex].Character = args.Character; CharIndex++; if (CharIndex == 8) { var code = new string(Enumerable.Range(0, 8).Select(i => CharDisp[i].Character).ToArray()); var d = KiddieCryptography.SpiralHexDecode(code); for (int i = 0; i < 8; i++) { CharDisp[i].Background = CharDisp[i].Background.WithColor(FlatColors.Concrete); } Server.JoinSession(d.Item1, d.Item2); } }