Beispiel #1
0
 void OnCollisionEnter2D(Collision2D col)
 {
     if (col.gameObject.name != "Player")
     {
         Destroy(col.gameObject);
         Destroy(gameObject);
         CountPoint counter = GameObject.FindGameObjectWithTag("GameManager").GetComponent <CountPoint>();
         counter.points++;
     }
 }
Beispiel #2
0
 // Use this for initialization
 void Start()
 {
     countPoint = parent.GetComponent <CountPoint> ();
 }