// it is being called every time our player hits something
 private void OnControllerColliderHit(ControllerColliderHit hit)
 {
     if (hit.point.z > transform.position.z + controller.radius)
     {
         BluetoothTest.SendValue("d");
         //ArduinoConnect.SendValue("d");
         Death();
     }
 }
예제 #2
0
 // Update is called once per frame
 void Update()
 {
     if (playerTransform.position.z - safeZone > (spawnZ - amnLanesOnScreen * laneLength))
     {
         SpawnLane();
         DeleteLane();
     }
     BluetoothTest.SendValue(activeLanes[1].ToString().Substring(0, 1));
     //ArduinoConnect.SendValue(activeLanes[1].ToString().Substring(0, 1));
     Debug.Log(activeLanes[1].ToString().Substring(0, 1));
 }