예제 #1
0
    public void TakeBeer(GameObject beer)
    {
        HasBeer = true;

        CurrentCategory = Dialogue.Category.Beer;

        beer.GetComponent <Beer>().enabled          = false;
        beer.GetComponent <Rigidbody>().isKinematic = true;
        beer.GetComponent <Collider>().enabled      = false;
        beer.transform.parent = this.transform;

        GameState.Instance.IncrementBeers();

        StartCoroutine(LerpBeerToHand(beer, takeBeerTime));
    }
예제 #2
0
    public override void Interact()
    {
        base.Interact();

        PresentDialogue(Dialogue.GetStringByCharacter(Character, GetTypeFromState()), 2);

        CurrentCategory = Constants.Dialogue.GetNext(CurrentCategory);

        if (CurrentCategory == Dialogue.Category.MusicTaste && GameState.Instance.IsMusicPlaying() == false)
        {
            CurrentCategory = Constants.Dialogue.GetNext(CurrentCategory);
        }

        if (audioSource.isPlaying == false)
        {
            audioSource.PlayOneShot(AudioManager.Instance.GetVoice(Character));
        }
    }