Advertisement
8ydilnik

bouns/smert

Sep 18th, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.70 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class smert : MonoBehaviour
  6. {
  7.    
  8.     // Start is called before the first frame update
  9.     void Start()
  10.     {
  11.  
  12.     }
  13.  
  14.     // Update is called once per frame
  15.     void Update()
  16.     {
  17.         if(time.instacne.timer == 10)
  18.         {
  19.             Debug.Log("G");
  20.         }
  21.     }
  22.  
  23.     public void OnTriggerEnter(Collider other)
  24.     {
  25.         if (other.tag == "Bonus")
  26.         {
  27.             Debug.Log("Bonus");
  28.             Destroy(other.gameObject);
  29.            
  30.  
  31.         }
  32.         if (other.tag == "smert")
  33.         {
  34.             Debug.Log("smert");
  35.             Destroy(gameObject);
  36.         }
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement