Advertisement
Guest User

Untitled

a guest
Jul 28th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.50 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3. public class pickupPoints : MonoBehaviour {
  4.  
  5.     public float spinSpeed;
  6.  
  7.     private void Update () {
  8.         transform.Rotate(0, spinSpeed * Time.deltaTime, 0, Space.World);
  9.     }
  10.  
  11.     private void OnTriggerEnter(Collider other)
  12.     {
  13.         if (other.gameObject.name == "Player")
  14.         {
  15.             GameObject.Find("CCR Panel").GetComponent<Coins>().cloudCoinRun += (int)FindObjectOfType<GameManager>().coinAmount;
  16.             gameObject.SetActive(false);
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement