void Start() { rb2d = GetComponent <Rigidbody2D> (); bleReceiver = new BleReceiver(); bleReceiver.bindToService(); // Request accelerometer data StartCoroutine(askForAccelData()); }
// Use this for initialization void Start() { rb2d = gameObject.GetComponent <Rigidbody2D> (); bleReceiver = new BleReceiver(); bleReceiver.bindToService(); // Ask for force data with a delay. If a delay isn't used, the // request is ignored. StartCoroutine(askForForceData()); }
// Use this for initialization void Start() { // Keep screen horizontal Screen.orientation = ScreenOrientation.LandscapeLeft; rb2d = gameObject.GetComponent <Rigidbody2D> (); bleReceiver = new BleReceiver(); bleReceiver.bindToService(); // Request accelerometer data StartCoroutine(askForAccelData()); }
// Use this for initialization void Start() { // Keep screen horizontal Screen.orientation = ScreenOrientation.LandscapeLeft; rb2d = GetComponent <Rigidbody2D> (); jumpForce = new Vector2(100.0f, 100.0f); jumpInProgress = false; jumpNum = 0; guiStyle = new GUIStyle(); bleReceiver = new BleReceiver(); bleReceiver.bindToService(); // Ask for force data with a delay. If a delay isn't used, // the request is ignored. StartCoroutine(askForForceData()); }