private LMBasePortInput GetProperInput() { //FIXME: Temperory if (KeyportData.type == "CASMB") { var retval = new LMGrindTable(); retval.Init(m_controller, KeyportData, TGGameConfig.GetValue("端口", -1)); return(retval); } int udp = TGGameConfig.GetValue("UDP", -1); if (udp >= 0) { var retval = new LMInput_UDP(); retval.Init(m_controller, KeyportData, udp); Debug.Log("准备衔接UDP设备"); return(retval); } else { var retval = new LMInput_Port(); retval.Init(m_controller, KeyportData, TGGameConfig.GetValue("端口", -1)); Debug.Log("准备衔接端口设备"); return(retval); } }
private LMBasePortInput GetProperInput() { int udp = m_controller.gameConfig.GetValue("UDP", -1); if (udp >= 0) { var retval = new LMInput_UDP(); retval.Init(m_controller, udp); return(retval); } else { var retval = new LMInput_Port(); retval.Init(m_controller, m_controller.gameConfig.GetValue("端口", -1), GetComponent <LMSerialPortCtrl>()); return(retval); } }