/*--------------------------------------------------------------------------------------------*/ protected override void PerformAdjustments() { HovercastInterface cast = FindObjectOfType <HovercastInterface>(); DemoHovercastCustomizer castCustom = cast.GetComponent <DemoHovercastCustomizer>(); castCustom.StandardFollowCursor = CursorType.LeftPalm; castCustom.SwitchedFollowCursor = CursorType.RightPalm; castCustom.StandardInteractionCursor = CursorType.RightIndex; castCustom.SwitchedInteractionCursor = CursorType.LeftIndex; }
/*--------------------------------------------------------------------------------------------*/ protected override void PerformAdjustments() { HovercastInterface cast = FindObjectOfType <HovercastInterface>(); DemoHovercastCustomizer castCustom = cast.GetComponent <DemoHovercastCustomizer>(); Deactivate(UnityUtil.FindComponentAll <Camera>("MainCamera").gameObject); Deactivate(UnityUtil.FindComponentAll <HoverItemDataSelector>("Re-orient")); castCustom.StandardFollowCursor = CursorType.LeftPinky; castCustom.SwitchedFollowCursor = CursorType.RightPinky; }
/*--------------------------------------------------------------------------------------------*/ private void UpdateWithTransitions() { HovercastOpenTransitioner open = gameObject.GetComponent <HovercastOpenTransitioner>(); HovercastRowTransitioner row = gameObject.GetComponent <HovercastRowTransitioner>(); HovercastInterface cast = gameObject.GetComponent <HovercastInterface>(); float openProg = open.TransitionProgressCurved; float openAlpha = (cast.IsOpen ? openProg : 1 - openProg); float prevAlpha = openAlpha * (1 - row.TransitionProgressCurved); float activeAlpha = openAlpha * row.TransitionProgressCurved; FadeItem(cast.OpenItem, 1); FadeItem(cast.BackItem, openAlpha); FadeItem(cast.TitleItem, openAlpha); FadeRow(cast.PreviousRow, prevAlpha); FadeRow(cast.ActiveRow, activeAlpha); }
/*--------------------------------------------------------------------------------------------*/ protected override void PerformAdjustments() { HoverCursorDataProvider cursProv = FindObjectOfType <HoverCursorDataProvider>(); ICursorDataForInput palL = cursProv.GetCursorDataForInput(CursorType.LeftPalm); ICursorDataForInput indR = cursProv.GetCursorDataForInput(CursorType.RightIndex); ICursorDataForInput look = cursProv.GetCursorDataForInput(CursorType.Look); HovercastInterface cast = FindObjectOfType <HovercastInterface>(); HoverCursorFollower castFollow = cast.GetComponent <HoverCursorFollower>(); HoverCursorRendererUpdater[] cursorRendUps = Resources.FindObjectsOfTypeAll <HoverCursorRendererUpdater>(); foreach (HoverCursorRendererUpdater rendUp in cursorRendUps) { CursorType ct = rendUp.GetComponent <HoverCursorFollower>().CursorType; rendUp.gameObject.SetActive(ct != CursorType.LeftPalm && ct != CursorType.RightPalm); } foreach (ICursorData cursorData in cursProv.Cursors) { ICursorDataForInput cursorDataInp = cursProv.GetCursorDataForInput(cursorData.Type); cursorDataInp.SetCapability(CursorCapabilityType.None); } palL.SetCapability(CursorCapabilityType.TransformOnly); indR.SetCapability(CursorCapabilityType.Full); look.SetCapability(CursorCapabilityType.TransformOnly); cast.transform.GetChild(0).localPosition = new Vector3(0, 0, 0.02f); //moves "TransformAdjuster" castFollow.CursorType = palL.Type; //for non-playing editor... palL.SetWorldRotation(Quaternion.Euler(0, 160, 80)); //face the camera (for editor) castFollow.Update(); //moves interface to the correct cursor transform cast.GetComponent <TreeUpdater>().Update(); //forces entire interface to update }
//////////////////////////////////////////////////////////////////////////////////////////////// /*--------------------------------------------------------------------------------------------*/ public void Awake() { if ( HovercastInterface == null ) { HovercastInterface = GetComponentInParent<HovercastInterface>(); } }