feat: chanraotuibu交互+摄像机直切+顺序调整+高度修正

- 新增ChanraoTuibuHandler: 蓝色矩形闪烁描边, 点击显示模型+激活ping.004
- AudioManager.SwitchToCamera3: 移除淡入淡出改为直接切换
- TouchPositionHandler: point1→激活chanraotuibu(非ping.004)
- PingClickHandler高度offset改为0.05f
This commit is contained in:
yangbear
2026-07-03 14:30:10 +08:00
parent e978f3beb8
commit 643084682a
5 changed files with 90 additions and 44 deletions
+2 -38
View File
@@ -97,48 +97,12 @@ public class AudioManager : MonoBehaviour
public void StopVoice() { _voiceSource.Stop(); }
public void SwitchToCamera3Smooth()
public void SwitchToCamera3()
{
StartCoroutine(Camera3SwitchRoutine());
}
System.Collections.IEnumerator Camera3SwitchRoutine()
{
var black = GameObject.Find("BlackScreenPanel");
var blackImg = black != null ? black.GetComponent<UnityEngine.UI.Image>() : null;
float duration = 0.8f;
// 渐入黑
if (black != null && blackImg != null)
{
black.SetActive(true);
for (float t = 0f; t < duration; t += Time.deltaTime)
{
blackImg.color = new Color(0, 0, 0, t / duration);
yield return null;
}
blackImg.color = Color.black;
}
// 切换摄像机
var cam2 = GameObject.Find("camera2");
var cam3 = GameObject.Find("camera3");
if (cam2 != null) { var c = cam2.GetComponent<Camera>(); if (c != null) c.enabled = false; }
if (cam3 != null) { var c = cam3.GetComponent<Camera>(); if (c != null) c.enabled = true; }
Debug.Log("[AudioManager] camera2→camera3 平滑切换完成");
yield return new WaitForSeconds(0.2f);
// 渐出黑
if (black != null && blackImg != null)
{
for (float t = 0f; t < duration; t += Time.deltaTime)
{
blackImg.color = new Color(0, 0, 0, 1f - t / duration);
yield return null;
}
blackImg.color = new Color(0, 0, 0, 0);
black.SetActive(false);
}
Debug.Log("[AudioManager] camera2→camera3 直接切换完成");
}
}