25 lines
468 B
C#
25 lines
468 B
C#
using UnityEngine;
|
|
|
|
public class FinishLine : MonoBehaviour
|
|
{
|
|
public GameManager gameManager;
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
if(other.tag== "Ball")
|
|
{
|
|
gameManager.Finished();
|
|
}
|
|
}
|
|
// Start is called once before the first execution of Update after the MonoBehaviour is created
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|