예제 #1
0
 public void OnStartClick()
 {
     StartButton.SetActive(false);
     StopButton.SetActive(true);
     IsStart = true;
     StartCoroutine("TakePhoto");
 }
예제 #2
0
    //public float[] Lx, Lz;
    //public string[] Location, Booked;

    void Start()
    {
        if (CameraDevice.Instance.SetFrameFormat(mPixelFormat, true))
        {
            mFormatRegistered = true;
        }
        else
        {
            mFormatRegistered = false;
        }
        CameraDevice.Instance.SetFocusMode(CameraDevice.FocusMode.FOCUS_MODE_CONTINUOUSAUTO);
        GameObject.Find("Canvas/Panel/Text").GetComponent <Text>().text = "Take a photo for localization";
        //GameObject.Find ("Canvas/StopButton").SetActive (false);
        EmptyObject = GameObject.Find("EmptyObject");
        ArCamera    = GameObject.Find("ARCamera");
        StartButton = GameObject.Find("Canvas/StartButton");
        StopButton  = GameObject.Find("Canvas/StopButton");
        PopUpPanel  = GameObject.Find("Canvas/PopUpPanel");
        StartButton.SetActive(true);
        StopButton.SetActive(false);
        PopUpPanel.transform.localScale = new Vector3(0, 0, 0);
        FreeSphereMaterial   = (Material)Resources.Load("Free");
        BookedSphereMaterial = (Material)Resources.Load("Booked");
        StartCoroutine("RoomInitialize");
        //Button btnLocation = GameObject.Find("Canvas/Button").GetComponent<Button>();
        //btnLocation.onClick.AddListener(OnClick);
    }
예제 #3
0
    public void NewSessionBUTTON()
    {
        TopPostPlotPanel.SetActive(false);
        BottomPostPlotPanel.SetActive(false);
        TopPlotPanel.SetActive(true);
        BottomPlotPanel.SetActive(true);
        StartButton.SetActive(true);
        StopButton.SetActive(true);
        SaveDataButton.SetActive(true);
        NewSessionButton.SetActive(false);
        UsersList.patientsessioninfo.SessionDate    = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
        SessionDateLabel.GetComponent <Text>().text = UsersList.patientsessioninfo.SessionDate;
        PlayPostButton.SetActive(false);
        PausePostButton.SetActive(false);
        StopPostButton.SetActive(false);
        CheckNodesButton.SetActive(true);

        Destroy(graphGOpost);
        Destroy(graphGOBottompost);
        graphGO       = Instantiate(graphPrefab) as GameObject;
        graphGOBottom = Instantiate(graphPrefabBottom) as GameObject;
        graph         = graphGO.GetComponent <WMG_Axis_Graph>();
        graphBottom   = graphGOBottom.GetComponent <WMG_Axis_Graph>();
        graph.changeSpriteParent(graphGO, TopPlotPanel);
        graphBottom.changeSpriteParent(graphGOBottom, BottomPlotPanel);
        post_plotting = false;
    }
예제 #4
0
 public void OnStopClick()
 {
     IsStart = false;
     //StopCoroutine ("TakePhoto");
     //StopCoroutine ("ReadPosition");
     //StopCoroutine ("RoomReservationInfo");
     StopAllCoroutines();
     StartButton.SetActive(true);
     StopButton.SetActive(false);
     //GameObject.Find ("Canvas/Panel/Text").GetComponent<Text> ().text = "Take a photo for localization";
 }
예제 #5
0
    //корутина отвечает за начало вращения
    private IEnumerator StartingCoroutine()
    {
        startButton.setPassive();
        for (int i = 0; i < reels.Count; i++)
        {
            reels[i].StartReel();
            yield return(new WaitForSeconds(delayList[i]));
        }
        yield return(new WaitForSeconds(reels[reels.Count - 1].BoostingTime));

        stopButton.SetActive();
        yield return(new WaitForSeconds(reels[reels.Count - 1].AnimationTime + reels[reels.Count - 1].StoppingTime - 0.001f));

        stopButton.setPassive();
        yield return(new WaitForSeconds(0.001f));

        startButton.SetActive();
    }
예제 #6
0
    public void StopPlotting()
    {
        s1.StopRealTimeUpdate();
        s2.StopRealTimeUpdate();

        s3.StopRealTimeUpdate();
        s4.StopRealTimeUpdate();

        StartButton.SetActive(false);
        StopButton.SetActive(false);
        NewSessionButton.SetActive(true);
        TopPlotPanel.SetActive(false);
        BottomPlotPanel.SetActive(false);
        TopPostPlotPanel.SetActive(true);
        BottomPostPlotPanel.SetActive(true);
        PlayPostButton.SetActive(true);
        PausePostButton.SetActive(false);
        StopPostButton.SetActive(true);
        CheckNodesButton.SetActive(false);
        PostPlotResults();
        post_plotting = true;
        frame         = 0;
    }