arkanoid/Assets/Scripts/GameOverArea.cs
2021-03-18 13:57:21 +01:00

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);
}
}