15 lines
304 B
C#
15 lines
304 B
C#
using UnityEngine;
|
|
|
|
public class Scorer : MonoBehaviour
|
|
{
|
|
int hits = 0;
|
|
private void OnCollisionEnter(Collision other)
|
|
{
|
|
if (other.gameObject.tag != "Hit")
|
|
{
|
|
hits++;
|
|
Debug.Log("You've bumped into something this many times: " + hits);
|
|
}
|
|
}
|
|
}
|