1
0
mirror of https://github.com/xiaopeng12138/MaiDXR.git synced 2024-11-30 21:47:16 +01:00
MaiDXR/Assets/Scripts/TouchToSerial.cs
xpeng 86347453f7 change xr render to multipass
change xr render to multi pass and update touch refresh rate and other small change
2022-01-23 01:28:11 +01:00

35 lines
649 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();
//Serial.ResetTouch();
}
}