예제 #1
0
 public override void OnPlayerEnteredRoom(Player newPlayer)
 {
     if (PhotonNetwork.CurrentRoom.PlayerCount >= 1)
     {
         if (PhotonNetwork.IsMasterClient)
         {
             PhotonSendEvent.SendHintsAndBoardLatAndLong(PhotonNetwork.CurrentRoom.PlayerCount);
         }
     }
 }
예제 #2
0
 public double[] GetCurrentLocation()
 {
     if (Input.location.status == LocationServiceStatus.Failed)
     {
         print("Unable to determine device location");
         double[] userLocation = new double[] { 0, 0 };
         PhotonSendEvent.SendCurrentUserLocation(userLocation);
         return(userLocation);
     }
     else
     {
         double[] userLocation = new double[] { Input.location.lastData.latitude, Input.location.lastData.longitude };
         PhotonSendEvent.SendCurrentUserLocation(userLocation);
         return(userLocation);
     }
 }