public BaseCarDivice(GameObject BTcore, GameObject statusUI) { btCore = BTcore; StatusUI = statusUI.GetComponent <CarStatusUI>(); statusparser = new StatusDeserializer(); statusparser.OnParsed += Statusparser_OnParsed; HalfManualMode = false; }
void Start() { packetbuffer = new StringBuilder(); InitBT(); this.gameObject.GetComponent <PingPongObj>().initOBJ(); ppManager = this.gameObject.GetComponent <PingPongManager>(); objectCarDevice = GameObject.Find("CarStatusObject"); statusDeserializer = objectCarDevice.GetComponent <ObjectCarDevice>().Basecardivice.statusparser; statusDeserializer.OnParsed += StatusDeserializer_OnParsed; statusDeserializer.OnParsedError += StatusDeserializer_OnParsedError; carDivice = objectCarDevice.GetComponent <ObjectCarDevice>().Basecardivice; }