Пример #1
0
    private IEnumerator WaitForInit()
    {
        MEHoloEntrance entrance = MEHoloEntrance.Instance;

        while (!entrance.HasInit)
        {
            yield return(null);
        }

        collaborationManager = CollaborationManager.Instance;

        collaborationManager.AddMessageHandler(this);

        MsgEntry entry = new MsgEntry();

        entry.ShowId = "Test";
        GetTransformFloat(cube.transform, entry);

        ShowObject  showObject = new ShowObject(entry);
        SceneObject roomData   = new SceneObject();

        roomData.ShowObjectDic.Add(showObject.ShowId, showObject);

        collaborationManager.roomInitData = roomData;

        collaborationManager.TurnOn();
    }
Пример #2
0
    /// <summary>
    /// initialization of modules and variables
    /// </summary>
    /// <returns></returns>
    private IEnumerator WaitForInit()
    {
        MEHoloEntrance entrance = MEHoloEntrance.Instance;

        while (!entrance.HasInit)
        {
            yield return(null);
        }

        //instantiate elements
        inputManager           = MultiInputManager.Instance;
        inputManager.layerMask = LayerMask.GetMask("Default") | LayerMask.GetMask("UI");
        inputManager.cbTap    += OnTap;
        //collaboration module
        collaborationManager = CollaborationManager.Instance;
        collaborationManager.AddMessageHandler(this);
        collaborationManager.cbEnterRoom = cbEnterRoom;
        //cursor module
        cursor = UIManager.Instance.cursorController;

        //it is possible to use more than message.
        //bear in mind that messages must have different id so
        string   showId = "showId001";
        MsgEntry msg    = new MsgEntry();

        msg.ShowId = showId;
        showObject = new ShowObject(msg);
        roomData   = new SceneObject();
        roomData.ShowObjectDic.Add(showObject.ShowId, showObject);

        collaborationManager.roomInitData = roomData;
        collaborationManager.TurnOn();
    }
Пример #3
0
    private IEnumerator WaitForInit()
    {
        MEHoloEntrance entrance = MEHoloEntrance.Instance;

        while (!entrance.HasInit)
        {
            yield return(null);
        }
        cm = CollaborationManager.Instance;
        cm.AddMessageHandler(this);
        initShowObject();
        cm.TurnOn();
    }
Пример #4
0
        private IEnumerator WaitForInit()
        {
            MEHoloEntrance entrance = MEHoloEntrance.Instance;

            while (!entrance.HasInit)
            {
                yield return(null);
            }

            cursor = UIManager.Instance.cursorController;


            // Todo: Begin your logic
            inputManager        = MultiInputManager.Instance;
            inputManager.cbTap += OnTap;

            cm = CollaborationManager.Instance;
            cm.AddMessageHandler(this);
            cm.cbEnterRoom = cbEnterRoom;

            string showId   = "showId001";
            string obj_type = "ColorType";

            MsgEntry msg = new MsgEntry();

            msg.ShowId = showId;

            ObjectInfo info = new ObjectInfo();

            info.ObjType = obj_type;
            msg.Info     = info;

            msg.Vec.Add((long)CurrentColor);

            showObject = new ShowObject(msg);
            roomData   = new SceneObject();
            roomData.ShowObjectDic.Add(showObject.ShowId, showObject);

            cm.roomInitData = roomData;
            cm.TurnOn();
        }
Пример #5
0
    public void Init()
    {
        cv_selected        = selectedContainer.gameObject.GetComponent <ContainerView>();
        cv_originContainer = originContainer.gameObject.GetComponent <ContainerView>();

        cv_selected.containerType        = ContainerView.ContainerType.SelectedContainer;
        cv_originContainer.containerType = ContainerView.ContainerType.OriginContainer;


        //selectedPlanet = new PlanetObject();
        selectedPlanet = planetObject_notSelected;

        gazeManager = MultiInputManager.Instance;

        if (expControl != null)
        {
            expControl.Init();
        }

        cm = CollaborationManager.Instance;
        cm.AddMessageHandler(this);
    }
Пример #6
0
    /// <summary>
    /// used for initialization of variable and modules
    /// </summary>
    /// <returns></returns>
    private IEnumerator WaitForInit()
    {
        MEHoloEntrance entrance = MEHoloEntrance.Instance;

        while (!entrance.HasInit)
        {
            yield return(null);
        }
        //instantiate modules
        inputManager = MultiInputManager.Instance;
        cm           = CollaborationManager.Instance;
        uiManager    = UIManager.Instance;

        // Todo: Begin your logic
        inputManager.cbTap += OnTap;
        cm.AddMessageHandler(this);
        cm.cbEnterRoom = cbEnterRoom;

        string showId   = "showId001";
        string obj_type = "name";

        string showId2 = "showId002";

        //creation of a message entry
        MsgEntry msg = new MsgEntry();

        msg.ShowId = showId;
        ObjectInfo info = new ObjectInfo();

        info.ObjType = obj_type;
        msg.Info     = info;
        //add position of the main camera
        msg.Pr.Add(mainCamera.transform.position.x);
        msg.Pr.Add(mainCamera.transform.position.y);
        msg.Pr.Add(mainCamera.transform.position.z);
        //add three other elements to Pr to
        //reserve position for the focused object
        msg.Pr.Add(0);
        msg.Pr.Add(0);
        msg.Pr.Add(0);
        showObject = new ShowObject(msg);
        roomData   = new SceneObject();
        roomData.ShowObjectDic.Add(showObject.ShowId, showObject);

        cm.roomInitData = roomData;
        cm.TurnOn();

        //UI module
        menu = uiManager.menuManager.GetMenu("Menu");
        menu.transform.position           = mainCamera.transform.forward;
        uiManager.menuManager.cbMenuHide += OnMenuHide;
        //register action for the elements of the Menu
        menu.RegistButtonClick("button1.a", ShowAction);
        menu.RegistButtonClick("button1.b", HideAction);
        menu.RegistButtonClick("button2", DeleteLines);
        menu.RegistButtonClick("button2.b", DeleteJsonAction);
        menu.RegistButtonClick("button3", LoadAction);
        menu.RegistButtonClick("button4", SaveAction);


        inputManager.layerMask = LayerMask.GetMask("Engine") | LayerMask.GetMask("UI");
    }