public void Init(LiveController b, LiveControllerUI panel)
        {
            liveController = b;
            controlPanel   = panel;

            ETListener.Get(StartHololensSpectatorView.gameObject).onClick = OnStartHololensConnect;
        }
示例#2
0
    private void Awake()
    {
        instance = this;
        int buttonsMove   = buttonsMoveObj.transform.childCount;
        int buttonsRotate = buttonsRotateObj.transform.childCount;

        inputManager = MultiInputManager.Instance;
        buttonMove   = new GameObject[buttonsMove];
        buttonRotate = new GameObject[buttonsRotate];
        for (int i = 0; i < buttonsRotate; i++)
        {
            buttonMove[i]   = buttonsMoveObj.transform.GetChild(i).gameObject;
            buttonRotate[i] = buttonsRotateObj.transform.GetChild(i).gameObject;
            ETListener.Get(buttonMove[i]).onDown = ButtonMoveClickDown;
            ETListener.Get(buttonMove[i]).onUp   = ButtonMoveClickUp;

            ETListener.Get(buttonRotate[i]).onDown = ButtonRotateClickDown;
            ETListener.Get(buttonRotate[i]).onUp   = ButtonRotateClickUp;

            ETListener.Get(buttonResetAnchor.gameObject).onClick = ResetAnchor;
        }
        t          = Time.realtimeSinceStartup;
        mainCamera = Camera.main;

        anchorSpeedSlider.onValueChanged.AddListener(ChangeSliderValue);

        //this.gameObject.SetActive(false);
    }
示例#3
0
 protected void RigisterButtonEvent(Button button, ETListener.VoidDelegate delHandle)
 {
     if (button != null)
     {
         ETListener.Get(button.gameObject).onClick = delHandle;
     }
 }
示例#4
0
        public void Init(LiveController b, LiveControllerUI panel)
        {
            liveController = b;
            controlPanel   = panel;

            ETListener.Get(buttonStart.gameObject).onClick       = OnStartClick;
            ETListener.Get(buttonStop.gameObject).onClick        = OnStopClick;
            ETListener.Get(DownloadAnchor.gameObject).onClick    = OnDownloadAnchorClick;
            ETListener.Get(DownloadSpatial.gameObject).onClick   = OnDownloadSpatialClick;
            ETListener.Get(buttonOpenStatus.gameObject).onClick  = OnOpenStatusPanel;
            ETListener.Get(buttonCloseStatus.gameObject).onClick = OnCloseStatusPanel;

            waitingText.text = "";

            statusText.text  = "Hololens offline";
            statusText.color = new Color(1f, 0.5f, 0.5f);

            anchorLocatedText.gameObject.SetActive(false);

            buttonOpenStatus.gameObject.SetActive(true);
            buttonCloseStatus.gameObject.SetActive(false);

            statusPanel.gameObject.SetActive(false);

            hasInit = true;
        }
示例#5
0
        public void Init(LiveController b)
        {
            liveController = b;

            SelectedEventDispatcher select = accountInput.gameObject.AddComponent <SelectedEventDispatcher>();

            select.cbSelect   = OnSelect;
            select.cbDeselect = OnDeselect;

            select            = passwordInput.gameObject.AddComponent <SelectedEventDispatcher>();
            select.cbSelect   = OnSelect;
            select.cbDeselect = OnDeselect;

            ETListener.Get(buttonSubmit.gameObject).onClick = OnSubmit;

            InitShow();

            ETListener.Get(buttonWifiRefresh.gameObject).onClick = OnWifiRefresh;

            ETListener.Get(buttonStartApp.gameObject).onClick = OnStartApp;
            ETListener.Get(buttonStopApp.gameObject).onClick  = OnStopApp;

            ETListener.Get(buttonWifiProfileConnect.gameObject).onClick = OnConnectWifiProfile;

            wifiProfileArea.SetActive(false);
        }
 // Use this for initialization
 void Start()
 {
     try
     {
         listener = new ETListener();
     }
     catch (SocketException e)
     {
         print(e);
     }
 }
示例#7
0
        private void Awake()
        {
            buttonSprite = buttonExit.GetComponent <Image>();
            RigisterButtonEvent(buttonClose, CloseThisUIForm);
            RigisterButtonEvent(buttonExit, ShowExitUI);
            RigisterButtonEvent(buttonYES, Exit);
            RigisterButtonEvent(buttonNO, HideExitUI);

            ETListener.Get(buttonExit.gameObject).onEnter = ButtonExitOnEnter;
            ETListener.Get(buttonExit.gameObject).onExit  = ButtonExitOnExit;
        }
 // Use this for initialization
 void Start()
 {
     try
     {
         listener = new ETListener();
     }
     catch( SocketException e )
     {
         print(e);
     }
 }
示例#9
0
    // Use this for initialization
    void Start()
    {
        try {
            listener = new ETListener();
        }
        catch(SocketException e) {
            Debug.LogError("EyeTribeClient listener instantiation error: " + e.Message.ToString());
        }

        float width = 250f,
        height = 75f;
        guiRect = new Rect(5f, Screen.height/2f - height/2f, width, height);
    }
示例#10
0
        private void Awake()
        {
            RigisterButtonEvent(buttonSetting, OpenSettingPannel);
            RigisterButtonEvent(buttonMoveAnchor, OpenMoveAnchorPannel);
            RigisterButtonEvent(buttonStartFollow, StartFollow);
            RigisterButtonEvent(buttonConnect, Connect);
            RigisterButtonEvent(buttonStopFollow, StopFollow);

            ETListener.Get(buttonStartFollow.gameObject).onEnter = ButtonStartFollowOnEnter;
            ETListener.Get(buttonStartFollow.gameObject).onExit  = ButtonStartFollowOnExit;

            OpenUIForm(SysDefine.UI_UIFormLiveInfomation);
            startFollowImage = buttonStartFollow.GetComponent <Image>();
        }
示例#11
0
    public void Awake()
    {
        AppConfig.Instance.LoadConfig(MEHoloConstant.NetworkConfigFile);
        AlbumURL             = AppConfig.Instance.GetConfigByFileName(MEHoloConstant.NetworkConfigFile, "Server_Host", "127.0.0.1");
        serverPort           = int.Parse(AppConfig.Instance.GetConfigByFileName(MEHoloConstant.NetworkConfigFile, "Server_Port", "8848"));
        listAlbumProfileName = new List <string>();
        IpInfo.text          = AlbumURL;
        //注册按钮
        ETListener.Get(buttonStartRecord.gameObject).onClick = RecordVideoStart;
        ETListener.Get(buttonStopRecord.gameObject).onClick  = RecordVideoStop;
        ETListener.Get(buttonTakePicture.gameObject).onClick = TakePicture;

        uploadWorker = new BackgroundWorker();
        loadingImage.gameObject.SetActive(false);
    }
示例#12
0
        private void Awake()
        {
            for (int i = 0; i < buttonMove.Count; i++)
            {
                ETListener.Get(buttonMove[i].gameObject).onDown = ButtonMoveClickDown;
                ETListener.Get(buttonMove[i].gameObject).onUp   = ButtonMoveClickUp;
            }

            for (int i = 0; i < buttonRotate.Count; i++)
            {
                ETListener.Get(buttonRotate[i].gameObject).onDown = ButtonRotateClickDown;
                ETListener.Get(buttonRotate[i].gameObject).onUp   = ButtonRotateClickUp;
            }

            RigisterButtonEvent(buttonAnchorReset, AnchorReset);
            RigisterButtonEvent(buttonCameraReset, CameraReset);

            mainCamera = Camera.main;
            sliderAnchorSpeed.onValueChanged.AddListener(ChangeSliderValue);

            RigisterButtonEvent(buttonClosePannel, ButtonClosePannel);
        }
示例#13
0
        // Use this for initialization
        public void Init(LiveController b, float _frameAspect)
        {
            liveController = b;

            InfoDialogText.text = "";
            InfoDialog.SetActive(false);
            ETListener.Get(infoDialogClose.gameObject).onClick = OnCloseInfoDialog;

            CanvasScaler canvasScaler = GetComponent <CanvasScaler>();
            float        screenWidth  = canvasScaler.referenceResolution.x;

            livePreview.Init(liveController, screenWidth, _frameAspect);

            liveUIForms.functionUIForm.Init(b, this);
            socialControl.Init();
            liveUIForms.anchorControlUIForm.Init();
            liveUIForms.hololensAgentUIForm.Init();
            liveUIForms.mediaOperationUIForm.Init();
            liveUIForms.socialUIForm.Init();

            hololensStatusPanel.gameObject.SetActive(false);
        }