Example #1
0
        /// <summary>
        /// Thumbnails the large.
        /// </summary>
        /// <returns>The large.</returns>
        /// <param name="obj">Object.</param>
        public void ThumbnailLargeOpen(GameObject obj)
        {
            _sendPictureLarge.gameObject.SetActive(true);
            this.GetComponent <BoxCollider2D> ().enabled = false;
            _sendPictureLargeOverlay.GetComponent <BoxCollider2D> ().enabled = true;
            PanelPopupAnimate(_sendPictureLargeOverlay.gameObject, false);
            _backSwipe.GetComponent <ScreenRaycaster> ().enabled = false;
            //_backSwipe.EventMessageTarget = _sendPictureLargeOverlay.gameObject;
            //メッセージのIDで取得
            var rawImage = _sendPictureLarge;

            string id = obj.name;

            foreach (var msg in MessageListApi._httpCatchData.result.messages)
            {
                if (msg.id == id)
                {
                    if (string.IsNullOrEmpty(msg.image.url) == false)
                    {
                        StartCoroutine(WwwToRendering(msg.image.url, rawImage));
                        break;
                    }
                }
            }
            HeaderPanel.Instance.BackButtonSwitch(false);
            HeaderPanel.Instance.BackButtonSwitch(true, ThumbnailLargeCloseEvent);
        }
Example #2
0
        /// <summary>
        /// Larges the prof image.
        /// </summary>
        public void LargeProfImageOpen()
        {
            HeaderPanel.Instance.BackButtonSwitch(false);
            HeaderPanel.Instance.BackButtonSwitch(true, LargeProfImageCloseEvent);

            _backSwipe.GetComponent <ScreenRaycaster> ().enabled = false;
            PanelPopupAnimate(_pforLarge, true);
            RawImage rawImage = _pforLarge.transform.GetChild(0).GetComponent <RawImage>();

            if (string.IsNullOrEmpty(GetUserApi._httpOtherUserCatchData.profile_image_url) == false)
            {
                StartCoroutine(WwwToRendering(GetUserApi._httpOtherUserCatchData.profile_image_url, rawImage));
            }
            return;
        }
    public void StopGame()
    {
        isGame = false;
        isSoft = false;

        swipedTop   = false;
        swipedFront = false;
        swipedSide  = false;

        /*if(startButton != null)
         * {
         *  startButton.SetActive(true);
         * }*/

        if (highScorePanel != null)
        {
            if (swipeRecognizer.GetComponent <SwipeRecognizer>().neutrinoScore > highScore)
            {
                string scoreTxt = "High Score: " + swipeRecognizer.GetComponent <SwipeRecognizer>().neutrinoScore.ToString() + " Points";
                highScorePanel.GetComponent <UnityEngine.UI.Text>().text = scoreTxt;
                Debug.Log("new high score");
            }
            else
            {
                highScorePanel.GetComponent <UnityEngine.UI.Text>().text = "High Score: " + highScore + " Points";
            }
        }

        if (eventPlayer != null)
        {
            //eventPlayer.GetComponent<EventPlayer>().PlayTutorialEvent();
            eventPlayer.GetComponent <EventPlayer>().StopCurrentEvent();
            eventPlayer.ResumePlaying();
            eventPlayer.scaleArray(3f);
        }

        if (mainCamera != null)
        {
            mainCamera.GetComponent <CameraRotate>().spin = false;
        }

        /*if (tutorial != null)
         * {
         *  tutorial.GetComponent<Tutorial>().playTutorial = true;
         * }*/

        if (swipeRecognizer != null)
        {
            swipeRecognizer.ExitResolveMode(false);
        }

        softTutorialText.GetComponent <UnityEngine.UI.Text>().text = "Let's do one for practice.";

        AudioSource[] aSources = GameObject.Find("Sound Effects").GetComponents <AudioSource>();
        if (aSources != null)
        {
            AudioSource background = aSources[4];
            if (background != null)
            {
                background.Stop();
            }
        }

        if (refinePanel != null)
        {
            refinePanel.SetActive(false);
        }

        if (congratsPanel != null)
        {
            congratsPanel.SetActive(false);
        }

        if (liveHelp != null)
        {
            liveHelp.SetActive(false);
        }

        if (eventPanel != null)
        {
            foreach (Transform child in eventPanel.transform)
            {
                if (child.gameObject.name.StartsWith("Event:"))
                {
                    Destroy(child.gameObject);
                }
            }
        }

        if (coneParent != null)
        {
            //coneParent.GetComponent<EarthView>().ClearCones();

            foreach (Transform child in coneParent.transform)
            {
                Destroy(child.gameObject);
            }
        }

        if (sphereMap != null)
        {
            sphereMap.GetComponent <PlotSphereMap>().ClearPoints();
        }

        //because these can be on during tutorial
        if (panelParent != null)
        {
            panelParent.SetActive(false);
        }

        //position top, front, side cameras for tutorial...
        EnableCameras(true, false);

        if (frontPanel != null)
        {
            frontPanel.GetComponent <UnityEngine.UI.Image>().color = UnityEngine.Color.cyan;
            frontPanel.transform.GetChild(0).gameObject.SetActive(false);
        }

        if (sidePanel != null)
        {
            sidePanel.GetComponent <UnityEngine.UI.Image>().color = UnityEngine.Color.cyan;
            sidePanel.transform.GetChild(0).gameObject.SetActive(false);
        }

        if (topPanel != null)
        {
            topPanel.GetComponent <UnityEngine.UI.Image>().color = UnityEngine.Color.cyan;
            topPanel.transform.GetChild(0).gameObject.SetActive(false);
        }
    }