Exemplo n.º 1
0
 public static PoserMode Instance()
 {
     if (instance == null)
     {
         instance    = new PoserMode();
         manager     = SL.Get <GameManager>();
         control     = SL.Get <IVRControl>();
         poserWidget = manager.poserWidget;
     }
     return(instance);
 }
Exemplo n.º 2
0
    public void IControlUpdate()
    {
        manager.modeStringEnum = GameManager.ModeString.View_Mode;

        if (control.LB() && softSelected)
        {
            ignore.Add(softSelected);
        }

        if (control.RB())
        {
            if (softSelected)
            {
                PickupSelected();
                WorldBuilderMain.ChoosePlaceMode();
            }
            return;
        }

        if (control.RHY() != 0)
        {
            Vector3 pos = manager.pointerGroup.localPosition;
            pos.y -= control.RHY() * Time.deltaTime / 4f;
            pos.z += control.RHY() * Time.deltaTime / 4f;
            manager.pointerGroup.localPosition = pos;
        }


        if (control.RB2())
        {
            if (softSelected)
            {
                if (TODV2.GetItemByID(softSelected.GetComponent <DioramaObject>().todID).hasAnimation)
                {
                    PickupSelected();
                    PoserMode.Instance().SetupMode();
                    return;
                }

                IWorldEvent iwe = softSelected.GetComponent <IWorldEvent>();
                if (iwe != null)
                {
                    iwe.StartEvent(WorldBuilderMain.Instance());
                    return;
                }
            }
        }
    }
Exemplo n.º 3
0
    private void IControlUpdatePose()
    {
        AnimFramSelect();

        if (control.RB())
        {
            DropObject();
            PoserMode.Instance().SetupMode();
            return;
        }

        if (control.RB2())
        {
            DropObject();
            return;
        }
    }
Exemplo n.º 4
0
    void Update()
    {
        SetMoveDioToggle();


        if (!loader.LoaderRunning)
        {
            if (Time.deltaTime > 0)
            {
                lastDeltaTime = Time.deltaTime;
            }

            RotateTextsToHMD();
            ToolTipTimer();

            if (control != null)
            {
                control.RefreshControl();
            }
            if (Input.GetKey("escape"))
            {
                Application.Quit();
            }

            LookMenuActivate();
            CheckForActiveButton();

            SelectObjectMode.SoftReset();

            mode.IUpdate();
            FMControlUpdate();


            if (moveDio)
            {
                PoserMode.DropObject();
                ScalePanMode.Instance().IControlUpdate();
            }
            else if (activeNode)
            {
                if (control.AR())
                {
                    ActivateNode();
                    return;
                }
                if (keyboard.gameObject.activeInHierarchy)
                {
                    KeyboardMode.Instance().IControlUpdate();
                }
            }
            else if (keyboard.gameObject.activeInHierarchy)
            {
                KeyboardMode.Instance().IControlUpdate();
            }
            else if (mode != null)
            {
                mode.IControlUpdate();
            }
            RightDetailText();
        }
        else
        {
            rightText.text = "Loading";
            if (moveDio)
            {
                ScalePanMode.Instance().IControlUpdate();
            }
        }
    }