public override IEnumerator StartRoutine() { Touch = new LMTouchCtrl(); KeyportData = TGData.KeyPortData; if (KeyportData == null) { m_controller.ErrorQuit("训练器材 " + TGData.DeviceName + "不存在!"); } // 检测是否开启触屏模式 // 如果不是则开始安排线程接受端口数据 if (KeyportData.type != "touch") { yield return(StartCoroutine(ConnectDeviceRoutine())); } // 打开热图 m_controller.SetHeatmapEnable(KeyportData.heatmap && !TGData.SceneDetail.disableHeatmap); m_controller.ProgressValue += 0.1f; Debug.Log("输入设备配置完成"); }
private void TouchInputUpdate(LMTouchCtrl touch) { if (touch == null) { return; } if (touch.IsTouched) { m_playerCtrl.MoveByTouch(touch.CurrentPosition); } if (touch.IsTouched) { TGUtility.DrawHeatmap2D(touch.ScreenPosition); } }