private void Start() { NextSend = Time.time + 1.0f / Frequency; controller = GetComponent <VehicleController>(); input_controller = GetComponent <VehicleInputController>(); gps = GetComponentInChildren <GpsDevice>(); mainRigidbody = GetComponent <Rigidbody>(); }
public void subscribeToGps(GpsDevice gps) { // remove events to be sure that they will be added once gps.locationChanged -= this.locationChangedMainWindow; gps.locationChanged -= this.locationChangedMapManager; gps.satellitesChanged -= this.satellitesChangedMainWindow; // add events gps.locationChanged += this.locationChangedMainWindow; gps.locationChanged += this.locationChangedMapManager; gps.satellitesChanged += this.satellitesChangedMainWindow; }
private void menuStartSymulator_Click(object sender, EventArgs e) { this.menuStartDevice.Checked = false; this.menuStartSymulator.Checked = true; if (this.gps != null) { this.gps.stop(); } this.gps = AppContext.Instance.getGpsSymulator(); restartGps(); }
private void menuStartSymulator_Click(object sender, EventArgs e) { this.menuStartDevice.Checked = false; this.menuStartSymulator.Checked = true; if (this.gps != null) this.gps.stop(); this.gps = AppContext.Instance.getGpsSymulator(); restartGps(); }
private void satellite(GpsDevice gps) { Invoke(updateSatHandler); }
private void location(GpsDevice gps) { Invoke(updatePosHandler); }