Esempio n. 1
0
    // Update is called once per frame
    void Update()
    {
        if (pinCount == 0)
        {
            _ParticleSystem1.gameObject.SetActive(true);
            _ScoreHolder.AddScore(StrikeValue);
            //StrikeCount = StrikeCount + 1;
        }

        if (pinCount == 10)
        {
            _ParticleSystem1.gameObject.SetActive(false);
        }
    }
 public void CoinTouched(GameObject coin)
 {
     ScoreHolder.AddScore(10);
     _spawnedCoinsAtPosition.Remove(coin);
     Destroy(coin);
     SpawnNewCoin();
 }
Esempio n. 3
0
        private void OnTriggerEnter(Collider other)
        {
            Coin c = other.GetComponent <Coin>();

            if (c is null)
            {
                return;
            }
            ScoreHolder.AddScore(10);
            this._coinPickupAudioSource.Play();
        }