Beispiel #1
0
    private void PickUpFruit()
    {
        hasPickedUp = true;
        ScoreDisplay scoreDisplay = FindObjectOfType <ScoreDisplay>();

        if (scoreDisplay)
        {
            scoreDisplay.AddToScore(scoreValue);
        }
        GetComponent <Animator>().SetTrigger(Constants.Animations.Collected);
    }