mirror of
https://github.com/xiaopeng12138/MaiDXR.git
synced 2025-02-21 04:36:29 +01:00
19 lines
356 B
C#
19 lines
356 B
C#
using UnityEngine;
|
|
|
|
public class TouchToSerial : MonoBehaviour
|
|
{
|
|
public int Area;
|
|
private void OnTriggerEnter(Collider other)
|
|
{
|
|
Serial.ChangeTouch((int)Area, true);
|
|
Serial.SendTouch();
|
|
}
|
|
|
|
private void OnTriggerExit(Collider other)
|
|
{
|
|
Serial.ChangeTouch((int)Area, false);
|
|
Serial.SendTouch();
|
|
}
|
|
|
|
}
|