예제 #1
0
 /// <summary>
 /// When a new user joins the session after the underworld is enabled,
 /// reset the target so that everyone is in the same game state.
 /// </summary>
 /// <param name="sender">sender</param>
 /// <param name="e">args</param>
 private void Instance_SessionJoined(object sender, SharingSessionTracker.SessionJoinedEventArgs e)
 {
     if (Underworld.activeSelf)
     {
         OrbPlacement.Instance.ResetStage();
     }
 }
 /// <summary>
 /// When a new user joins we want to send them the relative transform for the anchor if we have it.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Instance_SessionJoined(object sender, SharingSessionTracker.SessionJoinedEventArgs e)
 {
     if (GotTransform)
     {
         CustomMessages.Instance.SendStageTransform(transform.localPosition, transform.localRotation);
     }
 }
예제 #3
0
 private void OnSessionJoined(object sender, SharingSessionTracker.SessionJoinedEventArgs e)
 {
     if (inControl)
     {
         BroadcastAll();
     }
 }
예제 #4
0
 /// <summary>
 /// Called when a remote user is joins the session.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Instance_SessionJoined(object sender, SharingSessionTracker.SessionJoinedEventArgs e)
 {
     if (e.joiningUser.GetID() != SharingStage.Instance.Manager.GetLocalUser().GetID())
     {
         GetRemoteHeadInfo(e.joiningUser.GetID());
     }
 }
    // When a new user joins we want to send them the relative transform for the anchor if we have it.

    private void OnSessionJoined(object sender, SharingSessionTracker.SessionJoinedEventArgs e)
    {
        if (inControl && AnchorManager.Instance.IsAnchored())
        {
            RobotMessages.Instance.SendRobotTransform(transform.parent.localPosition, transform.parent.localRotation);
        }
    }
예제 #6
0
 private void OnSessionJoined(object sender, SharingSessionTracker.SessionJoinedEventArgs e)
 {
     if (inControl)
     {
         RobotMessages.Instance.SendRobotScale(transform.localScale);
     }
 }
 private void Instance_SessionJoined(object sender, SharingSessionTracker.SessionJoinedEventArgs e)
 {
     /*if (GotTransform)
      *      {
      *              CustomMessages.Instance.SendStageTransform(transform.localPosition, transform.localRotation);
      *      }*/
     Debug.Log("instance_sessionjoined called");
 }
    /// <summary>
    /// Called when a user (including the local user) joins a session.
    /// In this case we are using this event to signal that the sharing service is
    /// ready for us to make room related requests.
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    private void Instance_SessionJoined(object sender, SharingSessionTracker.SessionJoinedEventArgs e)
    {
        // We don't need to get this event anymore.
        SharingSessionTracker.Instance.SessionJoined -= Instance_SessionJoined;

        // We still wait to wait a few seconds for everything to settle.
        Invoke("MarkSharingServiceReady", 5);
    }
예제 #9
0
 private void Instance_SessionJoined(object sender, SharingSessionTracker.SessionJoinedEventArgs e)
 {
     if (GotTransform)
     {
         CustomMessages.Instance.SendStageTransform(transform.localPosition, transform.localRotation);
         //GameObject.Find("HologramCollection").GetComponent<Holoscanner.RemoteMeshManager>().anchorSet = true;
         Debug.Log("Trying to set the anchor correctly.");
     }
 }
예제 #10
0
 /// <summary>
 /// When a new user joins we want to send them the relative transform for the model if we have it.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Instance_SessionJoined(object sender, SharingSessionTracker.SessionJoinedEventArgs e)
 {
     if (GotTransform)
     {
         CustomMessages.Instance.SendStageTransform(transform.localPosition, transform.localRotation);
         //mriManager.UpdateClippingForRepositioning(GotTransform);
     }
     else
     {
         Debug.Log("HologramPlacement: Transform has not been stored ");
     }
 }
    private void Instance_SessionJoined(object sender, SharingSessionTracker.SessionJoinedEventArgs e)
    {
        /*if (GotTransform)
         *      {
         *              CustomMessages.Instance.SendStageTransform(transform.localPosition, transform.localRotation);
         *      }*/
        Debug.Log("instance_sessionjoined called");
        TextAsset textFile = (TextAsset)Resources.Load(resourceFile, typeof(TextAsset));

        System.IO.StringReader textStream = new System.IO.StringReader(textFile.text);
        studyCondition = textStream.ReadLine();

        switch (studyCondition)
        {
        case "srfdynamic":
            totalBall = Convert.ToInt32(textStream.ReadLine());
            CustomMessages.Instance.SendNetworkMessage("totalball+" + totalBall);
            CustomMessages.Instance.SendNetworkMessage("srfdynamic");
            Debug.Log("sending message");
            isGameCondition = true;
            break;

        case "nosrfdynamic":
            totalBall = Convert.ToInt32(textStream.ReadLine());
            CustomMessages.Instance.SendNetworkMessage("totalball+" + totalBall);
            CustomMessages.Instance.SendNetworkMessage("nosrfdynamic");
            Debug.Log("sending message");
            isGameCondition = true;
            break;

        case "eyesopen":     //eyes open
        case "eyesclosed":   //eyes closed
            isGameCondition = false;
            studyDuration   = Convert.ToInt32(textStream.ReadLine());
            break;

        case "srfstatic":
            isGameCondition = false;
            studyDuration   = Convert.ToInt32(textStream.ReadLine());
            CustomMessages.Instance.SendNetworkMessage("srfstatic");
            break;

        case "nosrfstatic":
            isGameCondition = false;
            studyDuration   = Convert.ToInt32(textStream.ReadLine());
            CustomMessages.Instance.SendNetworkMessage("nosrfstatic");
            break;

        default:
            break;
        }
    }
 /// <summary>
 /// Called when a user is joining.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Instance_SessionJoined(object sender, SharingSessionTracker.SessionJoinedEventArgs e)
 {
     GetRemoteHeadInfo(e.joiningUser.GetID());
 }
예제 #13
0
 private void Instance_SessionJoined(object sender, SharingSessionTracker.SessionJoinedEventArgs e)
 {
 }