void SweetSpot() { if (EG.GetCharge() >= 51 && EG.GetCharge() <= 80 && PM.GetGameIsPaused() == false) { GreenBarmultiplier = true; playerscore += 4; tempscore = (int)Time.deltaTime; if ((int)Time.deltaTime - tempscore == 2 && GreenBarmultiplier) { playerscore *= 2; } else if ((int)Time.deltaTime - tempscore == 5 && GreenBarmultiplier) { playerscore *= 5; } else if ((int)Time.deltaTime - tempscore == 10 && GreenBarmultiplier) { playerscore *= 10; } } else { GreenBarmultiplier = false; } //check to see how long the charge has been in the sweetspot and for the duration of charge staying in sweetspot a iterator increases }
void ButtonPress() { if (Input.GetKeyDown(KeyCode.A) && Aabletopress == true && PM.GetGameIsPaused() == false) { addPower += addPowerAddition; Aabletopress = false; Abutton = true; StartCoroutine(WaitforPress()); } else if (Input.GetKeyDown(KeyCode.A) && Dbutton && PM.GetGameIsPaused() == false) { Aabletopress = true; } if (Input.GetKeyDown(KeyCode.S) && Sabletopress == true && PM.GetGameIsPaused() == false) { addPower += addPowerAddition; Sabletopress = false; Sbutton = true; StartCoroutine(WaitforPress()); } else if (Input.GetKeyDown(KeyCode.S) && Abutton && PM.GetGameIsPaused() == false) { Sabletopress = true; } if (Input.GetKeyDown(KeyCode.D) && Dabletopress == true && PM.GetGameIsPaused() == false) { addPower += addPowerAddition; Dabletopress = false; Dbutton = true; StartCoroutine(WaitforPress()); } else if (Input.GetKeyDown(KeyCode.D) && Jbutton && PM.GetGameIsPaused() == false) { Dabletopress = true; } if (Input.GetKeyDown(KeyCode.J) && Jabletopress == true && PM.GetGameIsPaused() == false) { addPower += addPowerAddition; Jabletopress = false; Jbutton = true; StartCoroutine(WaitforPress()); } else if (Input.GetKeyDown(KeyCode.J) && Sbutton && PM.GetGameIsPaused() == false) { Jabletopress = true; } if (Input.GetKeyDown(KeyCode.K) && Kabletopress == true && PM.GetGameIsPaused() == false) { addPower += addPowerAddition; Kabletopress = false; Kbutton = true; StartCoroutine(WaitforPress()); } else if (Input.GetKeyDown(KeyCode.K) && Kbutton && PM.GetGameIsPaused() == false) { Aabletopress = true; } if (Input.GetKeyDown(KeyCode.L) && Labletopress == true && PM.GetGameIsPaused() == false) { addPower += addPowerAddition; Labletopress = false; Lbutton = true; StartCoroutine(WaitforPress()); } else if (Input.GetKeyDown(KeyCode.L) && Abutton && PM.GetGameIsPaused() == false) { Sabletopress = true; } }