添加 UI打开 不能操作 第一人称视角,优化对话框显示
This commit is contained in:
parent
3ca2d5ecb8
commit
ae7a14afe3
|
|
@ -8,6 +8,7 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
using UnityEngine.EventSystems;
|
||||||
|
|
||||||
#if UNITY_EDITOR
|
#if UNITY_EDITOR
|
||||||
using UnityEditor;
|
using UnityEditor;
|
||||||
|
|
@ -209,6 +210,7 @@ public class FirstPersonController : MonoBehaviour
|
||||||
|
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
|
if (EventSystem.current.IsPointerOverGameObject()) return;
|
||||||
float scrollValue = Input.GetAxis("Mouse ScrollWheel");
|
float scrollValue = Input.GetAxis("Mouse ScrollWheel");
|
||||||
playerCamera.fieldOfView = Mathf.Clamp(playerCamera.fieldOfView - scrollValue * 20, 10, 60);
|
playerCamera.fieldOfView = Mathf.Clamp(playerCamera.fieldOfView - scrollValue * 20, 10, 60);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -861,8 +861,8 @@ MonoBehaviour:
|
||||||
m_fontSizeMin: 18
|
m_fontSizeMin: 18
|
||||||
m_fontSizeMax: 72
|
m_fontSizeMax: 72
|
||||||
m_fontStyle: 0
|
m_fontStyle: 0
|
||||||
m_HorizontalAlignment: 2
|
m_HorizontalAlignment: 1
|
||||||
m_VerticalAlignment: 512
|
m_VerticalAlignment: 256
|
||||||
m_textAlignment: 65535
|
m_textAlignment: 65535
|
||||||
m_characterSpacing: 0
|
m_characterSpacing: 0
|
||||||
m_wordSpacing: 0
|
m_wordSpacing: 0
|
||||||
|
|
|
||||||
|
|
@ -451,7 +451,7 @@ MonoBehaviour:
|
||||||
m_fontSizeMax: 72
|
m_fontSizeMax: 72
|
||||||
m_fontStyle: 0
|
m_fontStyle: 0
|
||||||
m_HorizontalAlignment: 1
|
m_HorizontalAlignment: 1
|
||||||
m_VerticalAlignment: 512
|
m_VerticalAlignment: 256
|
||||||
m_textAlignment: 65535
|
m_textAlignment: 65535
|
||||||
m_characterSpacing: 0
|
m_characterSpacing: 0
|
||||||
m_wordSpacing: 0
|
m_wordSpacing: 0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue