public virtual void Init(FloatingScreen floatingScreen)
 {
     _floatingScreen = floatingScreen;
     _screenHandle   = floatingScreen.handle.transform;
     _realPos        = floatingScreen.transform.position;
     _realRot        = floatingScreen.transform.rotation;
     _vrPointer      = GetComponent <VRPointer>();
 }
Example #2
0
 protected void OnDestroy()
 {
     OnGrab              = null;
     OnRelease           = null;
     _vrPointer          = null;
     _floatingScreen     = null;
     _screenHandle       = null;
     _grabbingController = null;
 }
Example #3
0
 public virtual void Init(FloatingScreen floatingScreen, VRPointer pointer)
 {
     _floatingScreen = floatingScreen;
     _screenHandle   = floatingScreen.handle.transform;
     _realPos        = floatingScreen.transform.position;
     _realRot        = floatingScreen.transform.rotation;
     _vrPointer      = pointer;
     _isFpfc         = Environment.CommandLine.Contains("fpfc");
 }
Example #4
0
 public virtual void Init(FloatingScreen floatingScreen, VRPointer pointer)
 {
     _floatingScreen = floatingScreen;
     _screenHandle   = floatingScreen.handle.transform;
     _realPos        = floatingScreen.transform.position;
     _realRot        = floatingScreen.transform.rotation;
     _vrPointer      = pointer;
     _fpfc           = Resources.FindObjectsOfTypeAll <FirstPersonFlyingController>().FirstOrDefault();
 }
        //It's just for testing so don't yell at me
        private IEnumerator PresentTest <T>() where T : ViewController
        {
            yield return(new WaitForSeconds(1));

            ViewController testViewController = BeatSaberUI.CreateViewController <T>();

            FloatingScreen.FloatingScreen floatingScreen = FloatingScreen.FloatingScreen.CreateFloatingScreen(new Vector2(400, 200), true, Vector3.zero, Quaternion.identity);
            floatingScreen.SetRootViewController(testViewController, ViewController.AnimationType.None);
            Resources.FindObjectsOfTypeAll <MainFlowCoordinator>().First().InvokeMethod <object, FlowCoordinator>("PresentViewController", new object[] { testViewController, null, ViewController.AnimationDirection.Horizontal, false });
        }
Example #6
0
        public virtual void Init(FloatingScreen floatingScreen)
        {
            VRPointer vrPointer = GetComponent <VRPointer>();

            Init(floatingScreen, vrPointer);
        }