public void SetKey(ChangeKey script) { keyScript = script; Change = true; PanelInfo.GetComponent <RectTransform>().position = script.TextButton.GetComponent <RectTransform>().position; PanelInfo.SetActive(true); }
private static void CompareChangeKeys <T1, T2>(T1 a1, T2 a2, T1 b1, T2 b2) { var key1 = new ChangeKey <T1, T2>(a1, a2); var key2 = new ChangeKey <T1, T2>(b1, b2); Assert.AreEqual(key1, key2); Assert.AreEqual(key1, key2); Assert.IsTrue(key1.Equals(key2)); Assert.AreEqual(key1.GetHashCode(), key2.GetHashCode()); Assert.AreEqual(key1.ToString(), key2.ToString()); }
public void UpdateKeyText() { changedKeys = GameObject.Find("InputManager").GetComponent <ChangeKey>(); keysText.text = "Up: " + changedKeys.keycodeNames[(int)changedKeys.up] + "<br>" + "Down: " + changedKeys.keycodeNames[(int)changedKeys.down] + "<br>" + "Left: " + changedKeys.keycodeNames[(int)changedKeys.left] + "<br>" + "Right: " + changedKeys.keycodeNames[(int)changedKeys.right] + "<br>" + "Jump: " + changedKeys.keycodeNames[(int)changedKeys.jump] + "<br>" + "Pause: " + changedKeys.keycodeNames[(int)changedKeys.pause] + "<br>"; }
public void Add(IEnumerable <IChange> changes) { foreach (var change in changes) { var changeKey = new ChangeKey(change); if (ChangeKeyToChanges.TryGetValue(changeKey, out var existingChanges)) { existingChanges.Add(change); } else { ChangeKeyToChanges.Add(changeKey, new List <IChange> { change }); } } }
public IActionResult ChangeApiKey(string newApiKey) { if (_optionsMonitor.CurrentValue.RiotToken != newApiKey) { var newKey = new ChangeKey { DevelopmentApiKey = new DevelopmentApiKey { RiotToken = newApiKey } }; var configAsString = JsonConvert.SerializeObject(newKey, Formatting.Indented); System.IO.File.WriteAllText($@"{RiotApiConstants.ApiKeyFileName}", configAsString); return(Ok()); } return(BadRequest()); }
protected bool Equals(ChangeKey other) { return(Version == other.Version && Tag == other.Tag); }
protected bool Equals(ChangeKey other) { return(Version.Equals(other.Version) && ChangeType == other.ChangeType); }
private void Awake() { inputManager = GameObject.Find("InputManager").GetComponent <ChangeKey>(); loseControl = GameObject.Find("EventSystem").GetComponent <GameOver>(); }
// Start is called before the first frame update void Awake() { changedKeys = GameObject.Find("InputManager").GetComponent <ChangeKey>(); }
private void Awake() { controller = gameObject.GetComponent <CharacterController>(); inputManager = GameObject.Find("InputManager").GetComponent <ChangeKey>(); }
public ActionResult CommitChangeKey([FromBody] ChangeKeyRequest changeKey) { MicroCoin.Transactions.ChangeKeyTransaction transaction = null; try { transaction = ChangeKeyRequestToTransaction(changeKey); } catch (MicroCoinRPCException e) { return(this.HandlerError(e)); } if (changeKey.Signature == null) { return(BadRequest(new MicroCoinError(ErrorCode.InvalidOperation, "Missing signature", "You must sign the hash and set the signature"))); } transaction.Signature = new ECSignature { R = (Hash)changeKey.Signature.R.PadLeft(64, '0'), S = (Hash)changeKey.Signature.S.PadLeft(64, '0') }; if (Utils.ValidateSignature(transaction.GetHash(), transaction.Signature, transaction.AccountKey)) { using (var ms = new MemoryStream()) { using (BinaryWriter bw = new BinaryWriter(ms, System.Text.Encoding.Default, true)) { bw.Write(1); bw.Write(7); } transaction.SaveToStream(ms); ms.Position = 0; Hash h = ms.ToArray(); try { var resp = client.ExecuteOperations(h); var r = resp.First(); var tr = new ChangeKey { AccountNumber = (uint)r.Account, Balance = r.Balance, OpHash = r.Ophash, Signer = (uint)r.SignerAccount, SubType = r.SubType.ToString(), Type = r.Type.ToString(), Confirmations = r.Maturation, NewOwnerPublicKey = changeKey.NewOwnerPublicKey, Signature = changeKey.Signature }; return(Ok(tr)); } catch (MicroCoinRPCException e) { return(this.HandlerError(e)); } } } else { return(StatusCode(403, new MicroCoinError(ErrorCode.InvalidData, "Invalid signature", "Your signature is invalid"))); } }
// Start is called before the first frame update void Awake() { inputManager = GameObject.Find("InputManager").GetComponent <ChangeKey>(); menuManager = GameObject.Find("GUI").GetComponent <MenuManager>(); isPaused = false; }