24 lines
422 B
C#
24 lines
422 B
C#
using UnityEngine;
|
|
|
|
|
|
|
|
class Finish : MonoBehaviour
|
|
{
|
|
[SerializeField] private GameObject Effects;
|
|
|
|
private void Start()
|
|
{
|
|
Effects.SetActive(false);
|
|
}
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
if (other.gameObject.tag == "Player 1" || other.gameObject.tag == "Player 2")
|
|
{
|
|
Debug.Log("Ëèíèþ ïåðåøëè!");
|
|
Effects.SetActive(true);
|
|
|
|
}
|
|
|
|
}
|
|
}
|