Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- public class pickupPoints : MonoBehaviour {
- public float spinSpeed;
- private void Update () {
- transform.Rotate(0, spinSpeed * Time.deltaTime, 0, Space.World);
- }
- private void OnTriggerEnter(Collider other)
- {
- if (other.gameObject.name == "Player")
- {
- GameObject.Find("CCR Panel").GetComponent<Coins>().cloudCoinRun += (int)FindObjectOfType<GameManager>().coinAmount;
- gameObject.SetActive(false);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement