private void focusCameraOnPenguin() { playerPenguinGO = ClubPenguin.SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject; if (playerPenguinGO == null) { return; } CameraCullingMaskHelper.HideLayer(Camera.main, "RemotePlayer"); GameObject gameObject = GameObject.FindWithTag(UIConstants.Tags.UI_Chat); if (gameObject != null) { Canvas[] componentsInChildren = gameObject.GetComponentsInChildren <Canvas>(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].enabled = false; } } Service.Get <EventDispatcher>().DispatchEvent(new BlobShadowEvents.DisableBlobShadows(includeLocalPlayerShadow: false)); previousPenguinRotation = playerPenguinGO.transform.rotation; Vector3 vector = Camera.main.transform.position - playerPenguinGO.transform.position; playerPenguinGO.transform.rotation = Quaternion.LookRotation(new Vector3(vector.x, 0f, vector.z)); CinematographyEvents.ZoomCameraEvent evt = new CinematographyEvents.ZoomCameraEvent(state: true, ZoomPercentage, ZoomPercentage, 0f, ZoomHeightOffset, ZoomMinDist); Service.Get <EventDispatcher>().DispatchEvent(evt); isZoomSetup = true; isCameraSetUp = true; }
private void Awake() { CameraCullingMaskHelper.HideLayer(Camera.main, "IconRender"); SceneRefs.SetClothingDesignerCameraController(this); mainCamera = GetComponent <Camera>(); isAnimatingCamera = false; isAnimatingViewport = false; checkPosition = false; wasOriginalViewportSet = false; }
public static void HideRemotePlayers() { CameraCullingMaskHelper.HideLayer(Camera.main, "RemotePlayer"); CameraCullingMaskHelper.HideLayer(Camera.main, "AllPlayerInteractibles"); Service.Get <EventDispatcher>().DispatchEvent(new BlobShadowEvents.DisableBlobShadows(includeLocalPlayerShadow: false)); Service.Get <EventDispatcher>().DispatchEvent(default(PlayerNameEvents.HidePlayerNames)); Service.Get <EventDispatcher>().DispatchEvent(default(PlayerIndicatorEvents.HidePlayerIndicators)); if (SceneRefs.UiChatRoot != null) { WorldChatController componentInChildren = SceneRefs.UiChatRoot.GetComponentInChildren <WorldChatController>(); if (componentInChildren != null) { componentInChildren.IgnoreRemoteChat = true; } } }
private void setChatVisible(bool visible) { if (localPlayerIsInGame) { if (visible) { CinematicSpeechState.ShowChatUI(); CameraCullingMaskHelper.ShowLayer(Camera.main, "AllPlayerInteractibles"); } else { CinematicSpeechState.HideChatUI(); CameraCullingMaskHelper.HideLayer(Camera.main, "AllPlayerInteractibles"); } } }
public void RenderReward(DReward reward, RewardIconRenderComplete callback) { this.callback = callback; CameraCullingMaskHelper.HideLayer(Camera.main, "IconRender"); CoroutineRunner.Start(renderSprite((string)reward.UnlockID), this, "RewardIconRenderer_Sprite.renderSprite"); }
private void adjustSceneCullingMasks() { CameraCullingMaskHelper.HideLayer(Camera.main, "IconRender"); }