1
0
mirror of https://github.com/xiaopeng12138/MaiDXR.git synced 2025-02-22 04:59:29 +01:00
MaiDXR/Assets/Scripts/TouchToSerial.cs
2022-03-04 21:18:48 +01:00

34 lines
618 B
C#

using System;
using System.Runtime.InteropServices;
using System.Collections;
using UnityEngine;
public class TouchToSerial : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
//Serial.SendTouch();
}
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();
}
}