This commit is contained in:
MuHua-123
2026-09-22 14:12:24 +08:00
parent 301030487e
commit 41d9eac901
8 changed files with 27 additions and 27 deletions
@@ -65,7 +65,7 @@ public class UIVideoPlayPanel : ModuleUIPanel {
/// <summary> 更新 </summary> /// <summary> 更新 </summary>
public void Update() { public void Update() {
if (videoPlayer == null) { return; } if (videoPlayer == null) { return; }
showTime -= UnityEngine.Time.deltaTime; showTime -= UnityEngine.Time.unscaledDeltaTime;
Visibility visibility = showTime > 0 ? Visibility.Visible : Visibility.Hidden; Visibility visibility = showTime > 0 ? Visibility.Visible : Visibility.Hidden;
VideoController.style.visibility = visibility; VideoController.style.visibility = visibility;
//进度条 //进度条
@@ -98,12 +98,12 @@ namespace MuHua {
private void SlidingElasticity() { private void SlidingElasticity() {
Vector2 original = value; Vector2 original = value;
float maxX = Viewport.resolvedStyle.width < Container.resolvedStyle.width ? 1 : 0; float maxX = Viewport.resolvedStyle.width < Container.resolvedStyle.width ? 1 : 0;
if (value.x < 0) { value.x = Mathf.Lerp(value.x, 0, Time.deltaTime * 10); } if (value.x < 0) { value.x = Mathf.Lerp(value.x, 0, Time.unscaledDeltaTime * 10); }
if (value.x > maxX) { value.x = Mathf.Lerp(value.x, maxX, Time.deltaTime * 10); } if (value.x > maxX) { value.x = Mathf.Lerp(value.x, maxX, Time.unscaledDeltaTime * 10); }
float maxY = Viewport.resolvedStyle.height < Container.resolvedStyle.height ? 1 : 0; float maxY = Viewport.resolvedStyle.height < Container.resolvedStyle.height ? 1 : 0;
if (value.y < 0) { value.y = Mathf.Lerp(value.y, 0, Time.deltaTime * 10); } if (value.y < 0) { value.y = Mathf.Lerp(value.y, 0, Time.unscaledDeltaTime * 10); }
if (value.y > maxY) { value.y = Mathf.Lerp(value.y, maxY, Time.deltaTime * 10); } if (value.y > maxY) { value.y = Mathf.Lerp(value.y, maxY, Time.unscaledDeltaTime * 10); }
if (original != value) { UpdateValue(value); } if (original != value) { UpdateValue(value); }
} }
@@ -101,8 +101,8 @@ namespace MuHua {
private void SlidingElasticity() { private void SlidingElasticity() {
float original = value; float original = value;
float max = Viewport.resolvedStyle.width < Container.resolvedStyle.width ? 1 : 0; float max = Viewport.resolvedStyle.width < Container.resolvedStyle.width ? 1 : 0;
if (value < 0) { value = Mathf.Lerp(value, 0, Time.deltaTime * 10); } if (value < 0) { value = Mathf.Lerp(value, 0, Time.unscaledDeltaTime * 10); }
if (value > max) { value = Mathf.Lerp(value, max, Time.deltaTime * 10); } if (value > max) { value = Mathf.Lerp(value, max, Time.unscaledDeltaTime * 10); }
if (original != value) { UpdateValue(value); } if (original != value) { UpdateValue(value); }
} }
/// <summary> 鼠标松开或离开 </summary> /// <summary> 鼠标松开或离开 </summary>
@@ -101,8 +101,8 @@ namespace MuHua {
private void SlidingElasticity() { private void SlidingElasticity() {
float original = value; float original = value;
float max = Viewport.resolvedStyle.height < Container.resolvedStyle.height ? 1 : 0; float max = Viewport.resolvedStyle.height < Container.resolvedStyle.height ? 1 : 0;
if (value < 0) { value = Mathf.Lerp(value, 0, Time.deltaTime * 10); } if (value < 0) { value = Mathf.Lerp(value, 0, Time.unscaledDeltaTime * 10); }
if (value > max) { value = Mathf.Lerp(value, max, Time.deltaTime * 10); } if (value > max) { value = Mathf.Lerp(value, max, Time.unscaledDeltaTime * 10); }
if (original != value) { UpdateValue(value); } if (original != value) { UpdateValue(value); }
} }
/// <summary> 鼠标松开或离开 </summary> /// <summary> 鼠标松开或离开 </summary>
@@ -49,7 +49,7 @@ namespace MuHua {
public virtual void Update() { public virtual void Update() {
if (data == null || data.element == null) { return; } if (data == null || data.element == null) { return; }
Vector3 offset = data.element.worldBound.position - Slide.worldBound.position; Vector3 offset = data.element.worldBound.position - Slide.worldBound.position;
Slide.transform.position += offset * Time.deltaTime * 20; Slide.transform.position += offset * Time.unscaledDeltaTime * 20;
} }
/// <summary> 设置UI项 </summary> /// <summary> 设置UI项 </summary>
+2 -2
View File
@@ -2,8 +2,8 @@
"dependencies": { "dependencies": {
"com.unity.collab-proxy": "2.8.2", "com.unity.collab-proxy": "2.8.2",
"com.unity.feature.development": "1.0.1", "com.unity.feature.development": "1.0.1",
"com.unity.textmeshpro": "3.0.6", "com.unity.textmeshpro": "3.0.7",
"com.unity.timeline": "1.7.6", "com.unity.timeline": "1.7.7",
"com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.10", "com.unity.toolchain.win-x86_64-linux-x86_64": "2.0.10",
"com.unity.ugui": "1.0.0", "com.unity.ugui": "1.0.0",
"com.unity.visualscripting": "1.9.4", "com.unity.visualscripting": "1.9.4",
+13 -13
View File
@@ -27,16 +27,16 @@
"source": "builtin", "source": "builtin",
"dependencies": { "dependencies": {
"com.unity.ide.visualstudio": "2.0.22", "com.unity.ide.visualstudio": "2.0.22",
"com.unity.ide.rider": "3.0.28", "com.unity.ide.rider": "3.0.36",
"com.unity.ide.vscode": "1.2.5", "com.unity.ide.vscode": "1.2.5",
"com.unity.editorcoroutines": "1.0.0", "com.unity.editorcoroutines": "1.0.0",
"com.unity.performance.profile-analyzer": "1.2.2", "com.unity.performance.profile-analyzer": "1.2.3",
"com.unity.test-framework": "1.1.33", "com.unity.test-framework": "1.1.33",
"com.unity.testtools.codecoverage": "1.2.5" "com.unity.testtools.codecoverage": "1.2.6"
} }
}, },
"com.unity.ide.rider": { "com.unity.ide.rider": {
"version": "3.0.28", "version": "3.0.36",
"depth": 1, "depth": 1,
"source": "registry", "source": "registry",
"dependencies": { "dependencies": {
@@ -61,14 +61,14 @@
"url": "https://packages.unity.cn" "url": "https://packages.unity.cn"
}, },
"com.unity.performance.profile-analyzer": { "com.unity.performance.profile-analyzer": {
"version": "1.2.2", "version": "1.2.3",
"depth": 1, "depth": 1,
"source": "registry", "source": "registry",
"dependencies": {}, "dependencies": {},
"url": "https://packages.unity.cn" "url": "https://packages.unity.cn"
}, },
"com.unity.render-pipelines.core": { "com.unity.render-pipelines.core": {
"version": "14.0.11", "version": "14.0.12",
"depth": 1, "depth": 1,
"source": "builtin", "source": "builtin",
"dependencies": { "dependencies": {
@@ -86,18 +86,18 @@
"url": "https://packages.unity.cn" "url": "https://packages.unity.cn"
}, },
"com.unity.settings-manager": { "com.unity.settings-manager": {
"version": "2.0.1", "version": "2.1.0",
"depth": 2, "depth": 2,
"source": "registry", "source": "registry",
"dependencies": {}, "dependencies": {},
"url": "https://packages.unity.cn" "url": "https://packages.unity.cn"
}, },
"com.unity.shadergraph": { "com.unity.shadergraph": {
"version": "14.0.11", "version": "14.0.12",
"depth": 1, "depth": 1,
"source": "builtin", "source": "builtin",
"dependencies": { "dependencies": {
"com.unity.render-pipelines.core": "14.0.11", "com.unity.render-pipelines.core": "14.0.12",
"com.unity.searcher": "4.9.2" "com.unity.searcher": "4.9.2"
} }
}, },
@@ -129,7 +129,7 @@
"url": "https://packages.unity.cn" "url": "https://packages.unity.cn"
}, },
"com.unity.testtools.codecoverage": { "com.unity.testtools.codecoverage": {
"version": "1.2.5", "version": "1.2.6",
"depth": 1, "depth": 1,
"source": "registry", "source": "registry",
"dependencies": { "dependencies": {
@@ -139,7 +139,7 @@
"url": "https://packages.unity.cn" "url": "https://packages.unity.cn"
}, },
"com.unity.textmeshpro": { "com.unity.textmeshpro": {
"version": "3.0.6", "version": "3.0.7",
"depth": 0, "depth": 0,
"source": "registry", "source": "registry",
"dependencies": { "dependencies": {
@@ -148,13 +148,13 @@
"url": "https://packages.unity.cn" "url": "https://packages.unity.cn"
}, },
"com.unity.timeline": { "com.unity.timeline": {
"version": "1.7.6", "version": "1.7.7",
"depth": 0, "depth": 0,
"source": "registry", "source": "registry",
"dependencies": { "dependencies": {
"com.unity.modules.audio": "1.0.0",
"com.unity.modules.director": "1.0.0", "com.unity.modules.director": "1.0.0",
"com.unity.modules.animation": "1.0.0", "com.unity.modules.animation": "1.0.0",
"com.unity.modules.audio": "1.0.0",
"com.unity.modules.particlesystem": "1.0.0" "com.unity.modules.particlesystem": "1.0.0"
}, },
"url": "https://packages.unity.cn" "url": "https://packages.unity.cn"
+2 -2
View File
@@ -1,2 +1,2 @@
m_EditorVersion: 2022.3.34f1c1 m_EditorVersion: 2022.3.62f3c1
m_EditorVersionWithRevision: 2022.3.34f1c1 (1e17368ca73f) m_EditorVersionWithRevision: 2022.3.62f3c1 (1623fc0bbb97)