示例#1
0
    private void resetCamera()
    {
        if (!isCameraSetUp)
        {
            return;
        }
        if (playerPenguinGO != null)
        {
            playerPenguinGO.transform.rotation = previousPenguinRotation;
        }
        if (Camera.main != null)
        {
            CameraCullingMaskHelper.ShowLayer(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 = true;
            }
        }
        Service.Get <EventDispatcher>().DispatchEvent(default(BlobShadowEvents.EnableBlobShadows));
        if (isZoomSetup)
        {
            CinematographyEvents.ZoomCameraEvent evt = new CinematographyEvents.ZoomCameraEvent(state: false);
            Service.Get <EventDispatcher>().DispatchEvent(evt);
            isZoomSetup = false;
        }
    }
示例#2
0
 public static void ShowRemotePlayers()
 {
     CameraCullingMaskHelper.ShowLayer(Camera.main, "RemotePlayer");
     CameraCullingMaskHelper.ShowLayer(Camera.main, "AllPlayerInteractibles");
     Service.Get <EventDispatcher>().DispatchEvent(default(BlobShadowEvents.EnableBlobShadows));
     Service.Get <EventDispatcher>().DispatchEvent(default(PlayerNameEvents.ShowPlayerNames));
     Service.Get <EventDispatcher>().DispatchEvent(default(PlayerIndicatorEvents.ShowPlayerIndicators));
     if (SceneRefs.UiChatRoot != null)
     {
         WorldChatController componentInChildren = SceneRefs.UiChatRoot.GetComponentInChildren <WorldChatController>();
         if (componentInChildren != null)
         {
             componentInChildren.IgnoreRemoteChat = false;
         }
     }
 }
 private void setChatVisible(bool visible)
 {
     if (localPlayerIsInGame)
     {
         if (visible)
         {
             CinematicSpeechState.ShowChatUI();
             CameraCullingMaskHelper.ShowLayer(Camera.main, "AllPlayerInteractibles");
         }
         else
         {
             CinematicSpeechState.HideChatUI();
             CameraCullingMaskHelper.HideLayer(Camera.main, "AllPlayerInteractibles");
         }
     }
 }