예제 #1
0
파일: Status.cs 프로젝트: purdue-isat/STAR
        private void Start()
        {
            TopLeft      = transform.Find("TopLeft");
            TopLeftText  = TopLeft.GetComponentInChildren <Text>();
            TopLeftOther = TopLeft.Find("Other");

            TopRight      = transform.Find("TopRight");
            TopRightText  = TopRight.GetComponentInChildren <Text>();
            TopRightOther = TopRight.Find("Other");

            BottomLeft      = transform.Find("BottomLeft");
            BottomLeftText  = BottomLeft.GetComponentInChildren <Text>();
            BottomLeftOther = BottomLeft.Find("Other");

            BottomRight      = transform.Find("BottomRight");
            BottomRightText  = BottomRight.GetComponentInChildren <Text>();
            BottomRightOther = BottomRight.Find("Other");

            WebRTCConn           = ConnectionManager.Instance["WebRTC"] as WebRTCConnection;
            UltrasoundController = GameObject.Find("UltrasoundTracker").GetComponentInChildren <ARUWPController>();

            Configurations.Instance.SetAndAddCallback("Billboard_StatusDebugMode", true, v =>
            {
                Mode = v ? Modes.DEBUG : Mode = Modes.RUN;
                Clear();
            }, Configurations.CallNow.YES, Configurations.RunOnMainThead.YES);
            Configurations.Instance.AddCallback("*_PrepareUI", () => Configurations.Instance.Set("Billboard_StatusDebugMode", false));
        }
예제 #2
0
파일: Frame.cs 프로젝트: purdue-isat/STAR
        private void Update()
        {
            // Red if not connected
            // Yellow if connecting
            // Green if conntected
            WebRTCConnection conn = ConnectionManager.Instance["WebRTC"] as WebRTCConnection;

            switch (conn.Status)
            {
            case WebRTCConnection.Statuses.NotConnected:
                Color = Color.red;
                break;

            case WebRTCConnection.Statuses.Pending:
                Color = Color.yellow;
                break;

            case WebRTCConnection.Statuses.Connected:
                Color = Color.green;
                break;
            }
        }