public virtual void Init(FloatingScreen floatingScreen) { _floatingScreen = floatingScreen; _screenHandle = floatingScreen.handle.transform; _realPos = floatingScreen.transform.position; _realRot = floatingScreen.transform.rotation; _vrPointer = GetComponent <VRPointer>(); }
protected void OnDestroy() { OnGrab = null; OnRelease = null; _vrPointer = null; _floatingScreen = null; _screenHandle = null; _grabbingController = null; }
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"); }
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 }); }
public virtual void Init(FloatingScreen floatingScreen) { VRPointer vrPointer = GetComponent <VRPointer>(); Init(floatingScreen, vrPointer); }