public void Initialize(float startTime) { this.startTime = startTime; SetSpeed(); AudioPlay.PlaySound(aus, SoundLibrary.clipDictionary["birdFly"]); Destroy(gameObject, persistTime); }
public void BirdGG() { if (!rigid) { rigid = gameObject.AddComponent <Rigidbody2D> (); } birdCol.isTrigger = false; anim.SetTrigger("gg"); cadanCol.enabled = false; AudioPlay.PlaySound(aus, SoundLibrary.clipDictionary["birdCadan"]); }
public void ResumeGame() { if (isPaused) { score.enabled = false; isPaused = false; pauseUI.SetActive(false); isResuming = true; startResumeRealTime = Time.unscaledTime; AudioPlay.PlaySound(aus, SoundLibrary.clipDictionary["bigButtonPress"]); } }
private void OnTriggerEnter2D(Collider2D collision) { if (!isInvinciblePM && collision.CompareTag("Obstacle")) { isDamaged = true; currentHealth -= damage; AudioPlay.PlaySound(GetComponent <AudioSource>(), SoundLibrary.clipDictionary["comboBreak"]); //Debug.Log("Collide with house, cause damage"); //Debug.Log(currentHealth); StartCoroutine(BackFromInvincible(invincibleT)); } }
public void PauseGame() { if (!isPaused) { pm.enabled = false; for (int i = 0; i < bg.Length; i++) { bg[i].enabled = false; } isPaused = true; pauseUI.SetActive(true); Time.timeScale = 0f; AudioPlay.PlaySound(aus, SoundLibrary.clipDictionary["pauseButton"]); } }
public void PreviousPage() { if (!tutorialActivated) { Debug.Log("Tutorial not opened!"); } if (tutorialActivated) { tutorialPages[currentPageNum - 1].GetComponent <Animator>().SetTrigger("PreviousPage"); currentPageNum--; currentPage = tutorialPages[currentPageNum]; AudioPlay.PlaySound(aus, SoundLibrary.clipDictionary["nextPagePress"]); } }
/// <summary> /// Call this method to increase the current combo by 1. /// </summary> public static void ComboUp() { if (reset) { reset = false; comboNum_Display = 0; } comboNum_Display += 1; currentComboNum += 1; AudioPlay.PlaySound(aus, SoundLibrary.clipDictionary["comboUp"]); comboUI_static.text = comboNum_Display.ToString() + "\n<size=96>combo</size>"; comboUI_static.enabled = true; anim_UI.SetTrigger("Up"); //to do: play different clips based on current combo Num; }
public void NextPage() { if (!tutorialActivated) { Debug.Log("Tutorial not opened!"); } if (tutorialActivated) { currentPage.GetComponent <Animator>().SetTrigger("NextPage"); //currentPage.SetActive(false); currentPageNum++; tutorialPages[currentPageNum].SetActive(true); currentPage = tutorialPages[currentPageNum]; AudioPlay.PlaySound(aus, SoundLibrary.clipDictionary["nextPagePress"]); } }
public void PlayGOSFX() { AudioPlay.PlaySound(audioSource, SoundLibrary.clipDictionary["countDownGo"]); }
public void CloseTutorial() { tutorialPanel.SetActive(false); tutorialActivated = false; AudioPlay.PlaySound(aus, SoundLibrary.clipDictionary["closeButton"]); }
public void ButtonUp() { Debug.Log("123"); anim.SetBool("ButtonDown", false); AudioPlay.PlaySound(aus, SoundLibrary.clipDictionary["bigButtonPress"]); }