bug修改
This commit is contained in:
parent
a42ff097ae
commit
0604831cf4
19965
xiaofang/Assets/Res/gsj/HostCanvas.prefab
Normal file
19965
xiaofang/Assets/Res/gsj/HostCanvas.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
xiaofang/Assets/Res/gsj/HostCanvas.prefab.meta
Normal file
7
xiaofang/Assets/Res/gsj/HostCanvas.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f7536a880af59d64daa2ba997ab26188
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -16,6 +16,7 @@ public class Godvisual : MonoBehaviour
|
||||
private bool isSwitching = false; // 是否正在切换视角
|
||||
private bool isRotating = false; // 是否正在旋转
|
||||
private bool isAtGodView = true; // 是否处于上帝视角
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
// 订阅事件
|
||||
@ -49,6 +50,7 @@ public class Godvisual : MonoBehaviour
|
||||
transform.rotation = birdEyeView.rotation;
|
||||
isAtGodView = true;
|
||||
isRotating = false; // 停止旋转逻辑
|
||||
transform.GetComponent<Camera>().orthographic = true;//Õý½»
|
||||
}
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
@ -61,12 +63,23 @@ public class Godvisual : MonoBehaviour
|
||||
if (elapsedTime < voiceLength - 2f && !isSwitching)
|
||||
{
|
||||
RotateAroundBuilding();
|
||||
isAtGodView = false;
|
||||
}
|
||||
// 在最后两秒切换到目标视角
|
||||
else if (!isSwitching)
|
||||
{
|
||||
isSwitching = true;
|
||||
SwitchToFinalViewAsync();
|
||||
|
||||
}
|
||||
|
||||
if (isAtGodView)
|
||||
{
|
||||
transform.GetComponent<Camera>().orthographic = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
transform.GetComponent<Camera>().orthographic = false;
|
||||
}
|
||||
}
|
||||
// 环绕主建筑
|
||||
@ -101,7 +114,7 @@ public class Godvisual : MonoBehaviour
|
||||
transform.rotation = Quaternion.Lerp(startRotation, endRotation, progress);
|
||||
await Task.Yield(); // 等待一帧
|
||||
}
|
||||
|
||||
isAtGodView = true;
|
||||
// 确保最终位置和旋转准确
|
||||
transform.position = endPosition;
|
||||
transform.rotation = endRotation;
|
||||
|
@ -45,6 +45,7 @@ public class Panel3 : MonoBehaviour
|
||||
}
|
||||
}
|
||||
currentCameraIndex = Panel2.instance.currentCameraIndex;
|
||||
dropdown.value= currentCameraIndex;
|
||||
for(int i = 0; i < playerCameras.Count; i++)
|
||||
{
|
||||
if(i!=currentCameraIndex)
|
||||
|
@ -318,9 +318,9 @@ RectTransform:
|
||||
m_Father: {fileID: 286532050680097195}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 165, y: -54.0782}
|
||||
m_SizeDelta: {x: 303.2452, y: 108.1564}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &286532049526016700
|
||||
@ -2074,9 +2074,9 @@ RectTransform:
|
||||
m_Father: {fileID: 286532050680097195}
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 165, y: -378.54742}
|
||||
m_SizeDelta: {x: 303.2452, y: 108.1564}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &286532049988799085
|
||||
@ -2208,6 +2208,9 @@ MonoBehaviour:
|
||||
m_Script: {fileID: 11500000, guid: 4a817172e097c9b45abdfeebadcd984f, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
godView: {fileID: 0}
|
||||
playerCameras: []
|
||||
currentCameraIndex: -1
|
||||
--- !u!1 &286532050022400019
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -4776,7 +4779,7 @@ RectTransform:
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 300}
|
||||
m_SizeDelta: {x: 0, y: 534.3942}
|
||||
m_Pivot: {x: 0, y: 1}
|
||||
--- !u!114 &286532050680097196
|
||||
MonoBehaviour:
|
||||
@ -5186,9 +5189,9 @@ RectTransform:
|
||||
m_Father: {fileID: 286532050680097195}
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 165, y: -486.7038}
|
||||
m_SizeDelta: {x: 303.2452, y: 108.1564}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &286532050854345676
|
||||
@ -6250,9 +6253,9 @@ RectTransform:
|
||||
m_Father: {fileID: 286532050680097195}
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 165, y: -270.391}
|
||||
m_SizeDelta: {x: 303.2452, y: 108.1564}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &286532051015508370
|
||||
@ -7232,9 +7235,9 @@ RectTransform:
|
||||
m_Father: {fileID: 286532050680097195}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 0}
|
||||
m_AnchorMax: {x: 0, y: 0}
|
||||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 0, y: 1}
|
||||
m_AnchoredPosition: {x: 165, y: -162.2346}
|
||||
m_SizeDelta: {x: 303.2452, y: 108.1564}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!1 &286532051291737756
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -10385,8 +10385,8 @@ Camera:
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 0
|
||||
field of view: 68
|
||||
orthographic: 1
|
||||
orthographic size: 30
|
||||
m_Depth: 1
|
||||
m_CullingMask:
|
||||
@ -22926,6 +22926,52 @@ MeshCollider:
|
||||
m_Convex: 0
|
||||
m_CookingOptions: 30
|
||||
m_Mesh: {fileID: -4670371673946364318, guid: 00003e04dc9a2534eb207f108c7b0cd3, type: 3}
|
||||
--- !u!1 &1323973125
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1323973127}
|
||||
- component: {fileID: 1323973126}
|
||||
m_Layer: 0
|
||||
m_Name: BurstCollisionWorld
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1323973126
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1323973125}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
cellSpans:
|
||||
m_AlignBytes: 16
|
||||
--- !u!4 &1323973127
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1323973125}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 39
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1324073401
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -28395,52 +28441,6 @@ Transform:
|
||||
m_CorrespondingSourceObject: {fileID: 443876, guid: be8a9b4fd6545dd4e901964c42af5f6c, type: 3}
|
||||
m_PrefabInstance: {fileID: 1700457050}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &1705420776
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1705420778}
|
||||
- component: {fileID: 1705420777}
|
||||
m_Layer: 0
|
||||
m_Name: BurstCollisionWorld
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1705420777
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1705420776}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f1a161c4294214a4fbcb7e9e94800494, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
cellSpans:
|
||||
m_AlignBytes: 16
|
||||
--- !u!4 &1705420778
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1705420776}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 39
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1707678916
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -57773,7 +57773,7 @@ GameObject:
|
||||
- component: {fileID: 4965162874469270578}
|
||||
- component: {fileID: 4965162874469270579}
|
||||
m_Layer: 5
|
||||
m_Name: Canvas
|
||||
m_Name: HostCanvas
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
|
Loading…
Reference in New Issue
Block a user