Ejemplo n.º 1
0
 public void Initialize(float startTime)
 {
     this.startTime = startTime;
     SetSpeed();
     AudioPlay.PlaySound(aus, SoundLibrary.clipDictionary["birdFly"]);
     Destroy(gameObject, persistTime);
 }
Ejemplo n.º 2
0
 public void BirdGG()
 {
     if (!rigid)
     {
         rigid = gameObject.AddComponent <Rigidbody2D> ();
     }
     birdCol.isTrigger = false;
     anim.SetTrigger("gg");
     cadanCol.enabled = false;
     AudioPlay.PlaySound(aus, SoundLibrary.clipDictionary["birdCadan"]);
 }
Ejemplo n.º 3
0
 public void ResumeGame()
 {
     if (isPaused)
     {
         score.enabled = false;
         isPaused      = false;
         pauseUI.SetActive(false);
         isResuming          = true;
         startResumeRealTime = Time.unscaledTime;
         AudioPlay.PlaySound(aus, SoundLibrary.clipDictionary["bigButtonPress"]);
     }
 }
Ejemplo n.º 4
0
 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));
     }
 }
Ejemplo n.º 5
0
 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"]);
     }
 }
Ejemplo n.º 6
0
    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"]);
        }
    }
Ejemplo n.º 7
0
    /// <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;
    }
Ejemplo n.º 8
0
    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"]);
        }
    }
Ejemplo n.º 9
0
 public void PlayGOSFX()
 {
     AudioPlay.PlaySound(audioSource, SoundLibrary.clipDictionary["countDownGo"]);
 }
Ejemplo n.º 10
0
 public void CloseTutorial()
 {
     tutorialPanel.SetActive(false);
     tutorialActivated = false;
     AudioPlay.PlaySound(aus, SoundLibrary.clipDictionary["closeButton"]);
 }
Ejemplo n.º 11
0
 public void ButtonUp()
 {
     Debug.Log("123");
     anim.SetBool("ButtonDown", false);
     AudioPlay.PlaySound(aus, SoundLibrary.clipDictionary["bigButtonPress"]);
 }