public void doIt(GameObject gameObject) { // 顖Camera CameraPivot cameraPivot = FindObjectOfType <CameraPivot>(); Debug.Assert(cameraPivot != null); cameraPivot.lockYaw = true; cameraPivot.adjustYaw(degree); PlanetPlayerController ppc = gameObject.GetComponent <PlanetPlayerController>(); Debug.Assert(ppc != null); ppc.doDergeeLock = true; }
PlanetPlayerController getPlanetPlayerController() { return(planetPlayerController ? planetPlayerController : planetPlayerController = FindObjectOfType <PlanetPlayerController>()); }