1234567891011121314151617181920212223242526 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using Pools;
- //Jede Kreuzung die eine Richtungsänderung der Route hervorruft braucht dieses Skript (jedoch nicht die Slalomreferenzpunkte)
- public class CoinUpdate : MonoBehaviour
- {
- private CoinCreation coinCreator;
- // Start is called before the first frame update
- void Start()
- {
- coinCreator = GameObject.FindGameObjectWithTag("Route").GetComponent<CoinCreation>();
- }
- //Keep count of collisions with player
- private void OnTriggerEnter(Collider other)
- {
- if (other.gameObject.CompareTag("bike"))
- {
- coinCreator.PlaceCoins();
- }
- }
- }
|