void Update() { if (GameOver.GameOverFlag) { return; } timer += Time.deltaTime; if (timer >= maxTimer) { maxTimer = Random.Range(1.15f, 2.02f); timer = 0; KeyObj obj = (KeyObj)Instantiate(KeyObjOriginal [Random.Range(0, KeyObjOriginal.Length)]); obj.transform.parent = transform; clearnObj(); for (int i = 0; i < KeyObjDatas.Length; i++) { if (KeyObjDatas[i] == null) { KeyObjDatas[i] = obj; break; } } } }
/// <summary> /// Convert an byte[] parameter to string after decode (decrypt) /// </summary> /// <param name="kObj">have byte[] parameter </param> /// <returns></returns> #region Convert private string Convert(KeyObj kObj) { Stream output = PGPDecrypt.Decrypt(kObj.kByte, privateKeyPath, pwd); string later = GenerateStringFromStream(output); return(later); }
public override IKey ExtractKey(Item item) { Assert.ArgumentNotNull(item, "item"); KeyObj keyObj = new KeyObj() { Item = item, Key = this.GetPublishDate(item) }; return(keyObj); }