17 lines
398 B
C#
17 lines
398 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class GameOverArea : MonoBehaviour
|
|
{
|
|
void OnTriggerEnter(Collider other)
|
|
{
|
|
var ballMovement = other.GetComponent<BallMovement>();
|
|
if (ballMovement != null){
|
|
// Ball lost
|
|
Gamemaster.instance.LostBall();
|
|
}
|
|
Object.Destroy(other.gameObject);
|
|
}
|
|
}
|