12345678910111213141516171819202122232425262728 |
- using UnityEngine;
- public class AirWallDetection : MonoBehaviour
- {
- // 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()
- //{
-
- //}
- // 飞盘撞到空气墙,判断为出界
- private void OnTriggerEnter(Collider other)
- {
- if (other.gameObject.tag == "Throw Material")
- {
- Debug.Log("飞盘出界了。 " + other.gameObject.tag);
- PlayData.throwHitWall = true;
- PlayData.gameStatus = PlayData.GameStatus.finishOutOfBound;
- }
-
- }
- }
|