2022-01-05 19:44:30 +01:00
|
|
|
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()
|
|
|
|
{
|
2022-01-23 01:28:11 +01:00
|
|
|
//Serial.SendTouch();
|
2022-01-05 19:44:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
public int Area;
|
2022-01-05 20:38:10 +01:00
|
|
|
private void OnTriggerEnter(Collider other)
|
2022-01-05 19:44:30 +01:00
|
|
|
{
|
|
|
|
Serial.ChangeTouch((int)Area, true);
|
|
|
|
Serial.SendTouch();
|
|
|
|
}
|
|
|
|
|
2022-01-05 20:38:10 +01:00
|
|
|
private void OnTriggerExit(Collider other)
|
2022-01-05 19:44:30 +01:00
|
|
|
{
|
|
|
|
Serial.ChangeTouch((int)Area, false);
|
|
|
|
Serial.SendTouch();
|
|
|
|
//Serial.ResetTouch();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|