Files
PuzzleColorBall/Assets/Scripts/WallCollision.cs

20 lines
471 B
C#
Raw Normal View History

2023-02-28 13:31:31 +01:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
2023-03-07 13:55:45 +01:00
using UnityEditor;
2023-02-28 13:31:31 +01:00
public class WallCollision : MonoBehaviour
{
private void OnTriggerEnter(Collider other) {
if(other.gameObject.tag == "Player"){
Debug.Log("neki ment a falnak");
2023-03-07 13:55:45 +01:00
#if UNITY_EDITOR
EditorApplication.isPlaying = false;
#else
Application.Quit();
#endif
2023-02-28 13:31:31 +01:00
}
}
}