Ejemplo n.º 1
0
        /// <summary>
        /// Callback indicating that the Cloud Anchor was hosted.
        /// </summary>
        /// <param name="success">If set to <c>true</c> indicates the Cloud Anchor was hosted
        /// successfully.</param>
        /// <param name="response">The response string received.</param>
        public void OnAnchorHosted(bool success, string response)
        {
            m_AnchorFinishedHosting = success;
            UIController.OnAnchorHosted(success, response);
            GameObject.Find("LocalPlayer").GetComponent <SetupLocalPlayer>().Reposisionate();

            foreach (GameObject r in GameObject.FindGameObjectsWithTag("Player"))
            {
                r.GetComponent <SetupLocalPlayer>().makeVisible(true);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Callback indicating that the Cloud Anchor was hosted.
        /// </summary>
        /// <param name="success">If set to <c>true</c> indicates the Cloud Anchor was hosted
        /// successfully.</param>
        /// <param name="response">The response string received.</param>
        public void OnAnchorHosted(bool success, string response)
        {
            m_AnchorFinishedHosting = success;
            NetworkUIController.OnAnchorHosted(success, response);

            // If the Cloud Anchor is resolved, display the Chest
            GameObject.Find("LocalPlayer").GetComponent <LocalPlayerController>()
            .SpawnTreasureChest();

            GameObject.Find("LocalPlayer").GetComponent <LocalPlayerController>()
            .StartTimer();

            // If the Cloud Anchor is resolved, activate the Star Handler
            // Example GameObject, disabled for now
            // if (success && !StarHandler.activeSelf)
            // {
            //    StarHandler.SetActive(true);
            // }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Callback indicating that the Cloud Anchor was hosted.
 /// </summary>
 /// <param name="success">If set to <c>true</c> indicates the Cloud Anchor was hosted
 /// successfully.</param>
 /// <param name="response">The response string received.</param>
 public void OnAnchorHosted(bool success, string response)
 {
     m_AnchorFinishedHosting = success;
     UIController.OnAnchorHosted(success, response);
 }