示例#1
0
    public void TriggerObj(bool state)
    {
        if (state)
        {
            doorAnim.SetTrigger("OpenDoor");
        }
        else
        {
            doorAnim.SetTrigger("CloseDoor");
        }

        if (audioSource != null)
        {
            audioSource.PlayOtherSounds("Door");
        }
    }
示例#2
0
 public void AddToScore(int amount)
 {
     score += amount;
     ChangeScoreText();
     audioSource.PlayOtherSounds("Gem Pickup");
 }