feat: woman移动交互 + medicalBox显示 + ReturnToHome场景重置

- TouchPositionHandler: 点击touchArray球体→woman移动到womanPointArray对应位置
- medicalBox: 初始隐藏,实验开始后显示
- ReturnToHome: 重置场景(恢复man/man2, 隐藏woman/manInjury/medicalBox, 切回主摄像机, 重置Animator)
- ActivateExperimentObjects(): 实验启动时激活实验物件
This commit is contained in:
yangbear
2026-06-30 02:19:13 +08:00
parent cee3dd097c
commit 7100305765
91 changed files with 1251 additions and 63087 deletions
File diff suppressed because it is too large Load Diff
Binary file not shown.
+23
View File
@@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 25ff553be9c84452ab0a39fbfd06be77
AudioImporter:
externalObjects: {}
serializedVersion: 7
defaultSettings:
serializedVersion: 2
loadType: 0
sampleRateSetting: 0
sampleRateOverride: 44100
compressionFormat: 1
quality: 1
conversionMode: 0
preloadAudioData: 0
platformSettingOverrides: {}
forceToMono: 0
normalize: 1
loadInBackground: 0
ambisonic: 0
3D: 1
userData:
assetBundleName:
assetBundleVariant:

Before

Width:  |  Height:  |  Size: 12 MiB

After

Width:  |  Height:  |  Size: 12 MiB

Before

Width:  |  Height:  |  Size: 12 MiB

After

Width:  |  Height:  |  Size: 12 MiB

Before

Width:  |  Height:  |  Size: 12 MiB

After

Width:  |  Height:  |  Size: 12 MiB

Before

Width:  |  Height:  |  Size: 12 MiB

After

Width:  |  Height:  |  Size: 12 MiB

Before

Width:  |  Height:  |  Size: 3.0 MiB

After

Width:  |  Height:  |  Size: 3.0 MiB

Before

Width:  |  Height:  |  Size: 3.0 MiB

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.
+109
View File
@@ -0,0 +1,109 @@
fileFormatVersion: 2
guid: 1b1ce20a2102247d99cac16ad09ceb1a
ModelImporter:
serializedVersion: 22200
internalIDToNameTable: []
externalObjects: {}
materials:
materialImportMode: 2
materialName: 0
materialSearch: 1
materialLocation: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
removeConstantScaleCurves: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
importAnimatedCustomProperties: 0
importConstraints: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations: []
isReadable: 0
meshes:
lODScreenPercentages: []
globalScale: 1
meshCompression: 0
addColliders: 0
useSRGBMaterialColor: 1
sortHierarchyByName: 1
importPhysicalCameras: 1
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
nodeNameCollisionStrategy: 1
fileIdsGeneration: 2
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
keepQuads: 0
weldVertices: 1
bakeAxisConversion: 0
preserveHierarchy: 0
skinWeightsMode: 0
maxBonesPerVertex: 4
minBoneWeight: 0.001
optimizeBones: 1
meshOptimizationFlags: -1
indexFormat: 0
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVMarginMethod: 1
secondaryUVMinLightmapResolution: 40
secondaryUVMinObjectScale: 1
secondaryUVPackMargin: 4
useFileScale: 1
strictVertexDataChecks: 0
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0
blendShapeNormalImportMode: 1
normalSmoothingSource: 0
referencedClips: []
importAnimation: 1
humanDescription:
serializedVersion: 3
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
globalScale: 1
rootMotionBoneName:
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
autoGenerateAvatarMappingIfUnspecified: 1
animationType: 2
humanoidOversampling: 1
avatarSetup: 0
addHumanoidExtraRootOnlyWhenUsingAvatar: 1
importBlendShapeDeformPercent: 1
remapMaterialsIfMaterialImportModeIsNone: 0
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:
+720 -264
View File
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,25 @@
using UnityEngine;
/// <summary>
/// 挂在 touchArray 的每个子球体上,点击时把 woman 移动到 womanPointArray 对应位置。
/// 字段用 public 方便代码直接赋值。
/// </summary>
public class TouchPositionHandler : MonoBehaviour
{
public Transform targetPosition;
public GameObject womanObject;
private void OnMouseDown()
{
if (womanObject != null && targetPosition != null)
{
womanObject.transform.position = targetPosition.position;
womanObject.transform.rotation = targetPosition.rotation;
Debug.Log($"[TouchPosition] woman 移动到 {targetPosition.name} ({targetPosition.position})");
}
else
{
Debug.LogWarning($"[TouchPosition] {name}: womanObject 或 targetPosition 为空");
}
}
}
@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: aa18d349de8cc4564984a4f44c712138
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
+38 -2
View File
@@ -303,7 +303,7 @@ public class PageController : MonoBehaviour
openingFlow.PlayOpeningFlow(() =>
{
Debug.Log("PageController: 片头动画完成,显示 ExperimentPanel");
ShowPage(Page.Experiment);
ActivateExperimentObjects(); ShowPage(Page.Experiment);
var stepManager = FindObjectOfType<StepManager>();
if (stepManager != null)
@@ -331,9 +331,45 @@ public class PageController : MonoBehaviour
}
}
/// <summary>
/// 激活实验场景物件(medicalBox等),在动画完成后调用
/// </summary>
private void ActivateExperimentObjects()
{
Debug.Log("PageController: [ActivateExperimentObjects] 显示实验物件");
var medicalBox = GameObject.Find("medicalBox");
if (medicalBox != null) medicalBox.SetActive(true);
}
public void ReturnToHome()
{
Debug.Log("PageController: [ReturnToHome] 返回首页");
Debug.Log("PageController: [ReturnToHome] 返回首页并重置场景");
// 恢复 man 和 man2
var man = GameObject.Find("man");
if (man != null) man.SetActive(true);
var man2 = GameObject.Find("man2");
if (man2 != null) man2.SetActive(true);
// 隐藏实验专用物件
var woman = GameObject.Find("woman");
if (woman != null) woman.SetActive(false);
var manInjury = GameObject.Find("manInjury");
if (manInjury != null) manInjury.SetActive(false);
var medicalBox = GameObject.Find("medicalBox");
if (medicalBox != null) medicalBox.SetActive(false);
// 恢复主摄像机
var mainCam = Camera.main;
if (mainCam != null) mainCam.enabled = true;
var cam2 = GameObject.Find("camera2");
if (cam2 != null) { var c = cam2.GetComponent<Camera>(); if (c != null) c.enabled = false; }
// 重置 Animator 参数
var manAnim = man != null ? man.GetComponent<Animator>() : null;
if (manAnim != null) { manAnim.SetBool("IsStart", false); manAnim.SetBool("IsFull", false); }
ShowPage(Page.Home);
}