Ejemplo n.º 1
0
 void OnTriggerEnter(Collider otherCollider)
 {
     if (otherCollider == expectedCollider)
     {
         scoreKeeper scoreKeep = FindObjectOfType <scoreKeeper>();
         scoreKeep.IncrementScore(scorePerHit);
         print("Second trigger triggered");
     }
 }
Ejemplo n.º 2
0
	void OnCollisionEnter(Collision collision){
		scoreKeeper scoreKeep = FindObjectOfType<scoreKeeper>();
		scoreKeep.IncrementScore(scorePerHit);
	}