private void InitializeVariables() { score = new Bettr_Encryption.Encrypt(0); Score_Encrypt = "0"; Score_Encrypt = XOREncryption.encryptDecrypt(Score_Encrypt); ShowScore(); }
void Start() { InitCell(); InitCellRowAndCols(); AddNewCell(); score = new Bettr_Encryption.Encrypt(0); timer = new Bettr_Encryption.Encrypt(180); }
// Use this for initialization void Start() { Physics2D.gravity = new Vector2(0, -9.81f); Application.targetFrameRate = 60; SCORE = new Bettr_Encryption.Encrypt(0); Score_Encrypt = "0"; Score_Encrypt = XOREncryption.encryptDecrypt(Score_Encrypt); }
private void IncreaseScore(int amount) { score += new Bettr_Encryption.Encrypt(amount); Score_Encrypt = XOREncryption.encryptDecrypt(Score_Encrypt); Score_Encrypt = (int.Parse(Score_Encrypt) + amount).ToString(); Score_Encrypt = XOREncryption.encryptDecrypt(Score_Encrypt); ShowScore(); }
// Use this for initialization void Start() { Physics2D.gravity = new Vector2(0, -9.81f); Application.targetFrameRate = 60; Anim = GetComponent <Animation>(); position = transform.position; score = new Bettr_Encryption.Encrypt(0); SCORE_ENCRYPT = "0"; SCORE_ENCRYPT = XOREncryption.encryptDecrypt(SCORE_ENCRYPT); }
public void Start() { Physics2D.gravity = new Vector2(0, -9.81f); Application.targetFrameRate = 60; score = new Bettr_Encryption.Encrypt(0); Score_Encrypt = "0"; Score_Encrypt = XOREncryption.encryptDecrypt(Score_Encrypt); for (int foundationPileIndex = 0; foundationPileIndex < 4; foundationPileIndex++) { CreateFoundationPile(); } Create(2); }
private void Start() { SpawnScript.gameObject.SetActive(false); Physics2D.gravity = new Vector2(0, -40f); Application.targetFrameRate = 60; //BG spritechange BgChange.GetComponent <SpriteRenderer>().sprite = bgSPrite[Random.Range(0, bgSPrite.Length - 1)]; score = new Bettr_Encryption.Encrypt(0); Score_Encrypt = "0"; Score_Encrypt = XOREncryption.encryptDecrypt(Score_Encrypt); LevelInformation(); }
void LevelInformation() { if (Levels == 0) { //lives will be 4 lives = new Bettr_Encryption.Encrypt(4); LIVES = "4"; LIVES = XOREncryption.encryptDecrypt(LIVES); } else if (Levels == 1) { //lives will be 3 lives = new Bettr_Encryption.Encrypt(3); LIVES = "3"; LIVES = XOREncryption.encryptDecrypt(LIVES); } else if (Levels == 2) { //lives will be 3 lives = new Bettr_Encryption.Encrypt(3); LIVES = "3"; LIVES = XOREncryption.encryptDecrypt(LIVES); } else if (Levels == 3) { //lives will be 3 lives = new Bettr_Encryption.Encrypt(3); LIVES = "3"; LIVES = XOREncryption.encryptDecrypt(LIVES); } else if (Levels == 4) { //lives will be 2 lives = new Bettr_Encryption.Encrypt(2); LIVES = "2"; LIVES = XOREncryption.encryptDecrypt(LIVES); } }
bool UpMove(Cell_8[] lines) // moving up { for (int i = lines.Length - 1; i > 0; i--) { if (lines[i].Number == 0 && lines[i - 1].Number != 0) { lines[i].Number = lines[i - 1].Number; lines[i - 1].Number = 0; return(true); } //merging condition if (lines[i].Number != 0 && lines[i].Number == lines[i - 1].Number && !lines[i].addNumber && !lines[i - 1].addNumber) { lines[i].Number = lines[i].Number * 2; //audioevents switch (lines[i].Number) { case 16384: Callback(4); break; case 8192: Callback(4); break; case 4096: Callback(4); break; case 2048: Callback(4); break; case 1024: Callback(4); break; case 512: Callback(3); break; case 256: Callback(3); break; case 128: Callback(3); break; case 64: Callback(3); break; case 32: Callback(2); break; case 16: Callback(2); break; case 8: Callback(2); break; case 4: Callback(2); break; } lines[i - 1].Number = 0; lines[i].addNumber = true; lines[i].AnimationMerge(); emptyCells.Add(lines[i - 1]); score += new Bettr_Encryption.Encrypt(lines[i].Number); //Score Updater return(true); } if (lines[i].Number == 0 && lines[i - 1].Number != 0) { lines[i].Number = lines[i - 1].Number; lines[i - 1].Number = 0; return(true); } } return(false); }
IEnumerator ClearCube() { yield return(new WaitForEndOfFrame()); if (CubeList[0].gameObject.transform.childCount > 3) { bonus++; if (bonus > 1) { score += new Bettr_Encryption.Encrypt(bonus * 5); SCORE_ENCRYPT = XOREncryption.encryptDecrypt(SCORE_ENCRYPT); SCORE_ENCRYPT = (int.Parse(SCORE_ENCRYPT) + bonus * 5).ToString(); SCORE_ENCRYPT = XOREncryption.encryptDecrypt(SCORE_ENCRYPT); BonusText.gameObject.SetActive(true); BonusText.text = bonus.ToString() + "X"; //bloom of combo switch (bonus) { case 2: //bonus sound SFX.PlayOneShot(SFXCLIPS[4]); fmb.threshold = 0.68f; fmb.intensity = 2f; fmb.blurSize = 2.58f; fmb.blurIterations = 4; break; case 3: SFX.PlayOneShot(SFXCLIPS[5]); fmb.threshold = 0.68f; fmb.intensity = 2f; fmb.blurSize = 2.58f; fmb.blurIterations = 4; break; case 4: SFX.PlayOneShot(SFXCLIPS[6]); fmb.threshold = 0.68f; fmb.intensity = 3f; fmb.blurSize = 2.58f; fmb.blurIterations = 4; break; case 5: SFX.PlayOneShot(SFXCLIPS[7]); fmb.threshold = 0.68f; fmb.intensity = 4f; fmb.blurSize = 2.58f; fmb.blurIterations = 4; break; case 6: SFX.PlayOneShot(SFXCLIPS[8]); fmb.threshold = 0.68f; fmb.intensity = 5f; fmb.blurSize = 2.58f; fmb.blurIterations = 4; break; } } else { BonusText.gameObject.SetActive(false); } foreach (Transform t in CubeList[0].gameObject.transform) { if (CubeList[0].gameObject.tag == "TAG_3") { //score Encryption score += new Bettr_Encryption.Encrypt(10); SCORE_ENCRYPT = XOREncryption.encryptDecrypt(SCORE_ENCRYPT); SCORE_ENCRYPT = (int.Parse(SCORE_ENCRYPT) + 10).ToString(); SCORE_ENCRYPT = XOREncryption.encryptDecrypt(SCORE_ENCRYPT); if (bonus > 1) { foreach (ParticleSystem ps in BonusPS) { Instantiate(ps, t.transform.position, Quaternion.identity, particle.transform); } } else if (bonus == 1) { //brick break sound SFX.PlayOneShot(SFXCLIPS[3], 0.3f); Instantiate(PS, t.transform.position, Quaternion.identity, particle.transform); } upwardForce = 0.2f; } else { if (bonus > 1) { foreach (ParticleSystem ps in BonusPS) { Instantiate(ps, t.transform.position, Quaternion.identity, particle.transform); } } else { SFX.PlayOneShot(SFXCLIPS[3], 0.3f); Instantiate(PS, t.transform.position, Quaternion.identity, particle.transform); //bloom on normal destroy fmb.threshold = 0.38f; fmb.intensity = 1f; fmb.blurSize = 2.18f; fmb.blurIterations = 1; } //score Encryption score += new Bettr_Encryption.Encrypt(5); SCORE_ENCRYPT = XOREncryption.encryptDecrypt(SCORE_ENCRYPT); SCORE_ENCRYPT = (int.Parse(SCORE_ENCRYPT) + 5).ToString(); SCORE_ENCRYPT = XOREncryption.encryptDecrypt(SCORE_ENCRYPT); upwardForce = 0.2f; } } if (CubeList[0].transform.position.y < -2) { upwardForce *= 4; } else { upwardForce *= 1; } Destroy(CubeList[0].gameObject); CubeList.Remove(CubeList[0]); position.y += upwardForce; transform.position = position; yield return(new WaitForSeconds(0.1f)); Destroy(particle.transform.GetChild(0).gameObject); Destroy(particle.transform.GetChild(1).gameObject); Destroy(particle.transform.GetChild(2).gameObject); yield return(new WaitForSeconds(0.2f)); bonus = 0; } StopCoroutine(ClearCube()); }