This commit is contained in:
yzx 2024-07-10 14:11:44 +08:00
parent 73cc1b6cb4
commit 44fa05a837
22 changed files with 798 additions and 233 deletions

File diff suppressed because one or more lines are too long

View File

@ -114,12 +114,12 @@ Material:
- _UVSec: 0
- _ZWrite: 1
- __dirty: 0
- _step_p1: 0
- _step_p2: 0
- _step_p3: 0
- _step_p4: 0
- _step_p5: 0
- _step_p6: 0
- _step_p1: 1
- _step_p2: 1
- _step_p3: 1
- _step_p4: 1
- _step_p5: 1
- _step_p6: 1
m_Colors:
- _BaseCol: {r: 0.23429155, g: 0.28497556, b: 0.3679245, a: 0}
- _Color: {r: 1, g: 1, b: 1, a: 1}

View File

@ -55,7 +55,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Texture: {fileID: 2800000, guid: 1aa81dcb57fba2c438e16f64c9b7121b, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:

View File

@ -55,7 +55,7 @@ Material:
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Texture: {fileID: 2800000, guid: e0db6d673be6b0f459d51dcfa5b1b1a3, type: 3}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 KiB

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: e0db6d673be6b0f459d51dcfa5b1b1a3
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

View File

@ -0,0 +1,127 @@
fileFormatVersion: 2
guid: 1aa81dcb57fba2c438e16f64c9b7121b
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 1
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 0
wrapV: 0
wrapW: 0
nPOTScale: 1
lightmap: 0
compressionQuality: 50
spriteMode: 0
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 0
spriteTessellationDetail: -1
textureType: 0
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: WebGL
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -11657,6 +11657,16 @@ PrefabInstance:
m_RemovedComponents:
- {fileID: 859467360511336960, guid: 7e42ad4821305374ba380adcf42bf09b, type: 3}
- {fileID: 4595752545965128044, guid: 7e42ad4821305374ba380adcf42bf09b, type: 3}
- {fileID: 7032421955157156937, guid: 7e42ad4821305374ba380adcf42bf09b, type: 3}
- {fileID: 1440940322105657444, guid: 7e42ad4821305374ba380adcf42bf09b, type: 3}
- {fileID: 4628528169213530016, guid: 7e42ad4821305374ba380adcf42bf09b, type: 3}
- {fileID: 5096303422024874528, guid: 7e42ad4821305374ba380adcf42bf09b, type: 3}
- {fileID: 6993682975309867795, guid: 7e42ad4821305374ba380adcf42bf09b, type: 3}
- {fileID: 1398821268503086910, guid: 7e42ad4821305374ba380adcf42bf09b, type: 3}
- {fileID: 4660511782880329978, guid: 7e42ad4821305374ba380adcf42bf09b, type: 3}
- {fileID: 5057287195612689786, guid: 7e42ad4821305374ba380adcf42bf09b, type: 3}
- {fileID: 6892233002224281840, guid: 7e42ad4821305374ba380adcf42bf09b, type: 3}
- {fileID: 7749627281244844956, guid: 7e42ad4821305374ba380adcf42bf09b, type: 3}
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents:

View File

@ -11173,7 +11173,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7238574848161893510, guid: 8a244cdd2f00e534aadd2512c3bbfda1, type: 3}
propertyPath: m_LocalPosition.y
value: -0.008
value: -0.0034
objectReference: {fileID: 0}
- target: {fileID: 7238574848161893510, guid: 8a244cdd2f00e534aadd2512c3bbfda1, type: 3}
propertyPath: m_LocalPosition.z
@ -11502,6 +11502,9 @@ PrefabInstance:
- targetCorrespondingSourceObject: {fileID: 974051541301588327, guid: 8a244cdd2f00e534aadd2512c3bbfda1, type: 3}
insertIndex: -1
addedObject: {fileID: 1973164607}
- targetCorrespondingSourceObject: {fileID: 974051541301588327, guid: 8a244cdd2f00e534aadd2512c3bbfda1, type: 3}
insertIndex: -1
addedObject: {fileID: 1973164608}
- targetCorrespondingSourceObject: {fileID: 2999703077997545715, guid: 8a244cdd2f00e534aadd2512c3bbfda1, type: 3}
insertIndex: -1
addedObject: {fileID: 1509134563}
@ -37202,6 +37205,174 @@ BoxCollider:
serializedVersion: 3
m_Size: {x: 36.589027, y: 82.01166, z: 1.0063992}
m_Center: {x: 33.392933, y: 0.0000923872, z: -19.971397}
--- !u!114 &1973164608
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1973164605}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3}
m_Name:
m_EditorClassIdentifier:
profile: {fileID: 0}
profileSync: 0
previewInEditor: 1
camerasLayerMask:
serializedVersion: 2
m_Bits: 4294967295
effectGroup: 0
effectGroupLayer:
serializedVersion: 2
m_Bits: 4294967295
effectNameFilter:
combineMeshes: 0
alphaCutOff: 0
cullBackFaces: 1
ignoreObjectVisibility: 0
reflectionProbes: 0
GPUInstancing: 1
depthClip: 0
cameraDistanceFade: 0
cameraDistanceFadeNear: 0
cameraDistanceFadeFar: 1000
normalsOption: 0
ignore: 0
_highlighted: 0
fadeInDuration: 0
fadeOutDuration: 0
flipY: 0
constantWidth: 1
subMeshMask: -1
overlay: 0
overlayMode: 0
overlayColor: {r: 1, g: 0.92156863, b: 0.015686275, a: 1}
overlayAnimationSpeed: 1
overlayMinIntensity: 0.5
overlayBlending: 1
overlayTexture: {fileID: 0}
overlayTextureUVSpace: 0
overlayTextureScale: 1
outline: 1
outlineColor: {r: 0.31254458, g: 1, b: 0, a: 1}
outlineColorStyle: 0
outlineGradient:
serializedVersion: 2
key0: {r: 1, g: 1, b: 1, a: 1}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 0, g: 0, b: 0, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 0
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 65535
atime2: 0
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_ColorSpace: -1
m_NumColorKeys: 2
m_NumAlphaKeys: 2
outlineGradientInLocalSpace: 0
outlineWidth: 0.1
outlineQuality: 3
outlineDownsampling: 2
outlineVisibility: 0
glowBlendMode: 0
outlineOptimalBlit: 1
outlineBlitDebug: 0
outlineIndependent: 0
glow: 0
glowWidth: 0.4
glowQuality: 3
glowDownsampling: 2
glowHQColor: {r: 0.64, g: 1, b: 0, a: 1}
glowDithering: 1
glowMagicNumber1: 0.75
glowMagicNumber2: 0.5
glowAnimationSpeed: 1
glowVisibility: 0
glowOptimalBlit: 1
glowBlitDebug: 0
glowBlendPasses: 1
glowPasses:
- offset: 4
alpha: 0.1
color: {r: 0.64, g: 1, b: 0, a: 1}
- offset: 3
alpha: 0.2
color: {r: 0.64, g: 1, b: 0, a: 1}
- offset: 2
alpha: 0.3
color: {r: 0.64, g: 1, b: 0, a: 1}
- offset: 1
alpha: 0.4
color: {r: 0.64, g: 1, b: 0, a: 1}
glowIgnoreMask: 0
innerGlow: 0
innerGlowWidth: 1
innerGlowColor: {r: 1, g: 1, b: 1, a: 1}
innerGlowVisibility: 0
targetFX: 0
targetFXTexture: {fileID: 0}
targetFXColor: {r: 1, g: 1, b: 1, a: 1}
targetFXCenter: {fileID: 0}
targetFXRotationSpeed: 50
targetFXInitialScale: 4
targetFXEndScale: 1.5
targetFXScaleToRenderBounds: 1
targetFXAlignToGround: 0
targetFXFadePower: 32
targetFXGroundMaxDistance: 10
targetFXGroundLayerMask:
serializedVersion: 2
m_Bits: 4294967295
targetFXTransitionDuration: 0.5
targetFXStayDuration: 1.5
targetFXVisibility: 1
seeThrough: 2
seeThroughOccluderMask:
serializedVersion: 2
m_Bits: 4294967295
seeThroughOccluderThreshold: 0.3
seeThroughOccluderMaskAccurate: 0
seeThroughOccluderCheckInterval: 1
seeThroughOccluderCheckIndividualObjects: 0
seeThroughDepthOffset: 0
seeThroughMaxDepth: 0
seeThroughIntensity: 0.8
seeThroughTintAlpha: 0.5
seeThroughTintColor: {r: 1, g: 0, b: 0, a: 1}
seeThroughNoise: 1
seeThroughBorder: 0
seeThroughBorderColor: {r: 0, g: 0, b: 0, a: 1}
seeThroughBorderOnly: 0
seeThroughBorderWidth: 0.45
seeThroughOrdered: 0
seeThroughTexture: {fileID: 0}
seeThroughTextureUVSpace: 0
seeThroughTextureScale: 1
rmsCount: 11
hitFxInitialIntensity: 0
hitFxMode: 0
hitFxFadeOutDuration: 0.25
hitFxColor: {r: 1, g: 1, b: 1, a: 1}
hitFxRadius: 0.5
--- !u!1 &1974144506 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 5397049522284226170, guid: 8a244cdd2f00e534aadd2512c3bbfda1, type: 3}
@ -187596,7 +187767,6 @@ GameObject:
m_Component:
- component: {fileID: 978902393655310743}
- component: {fileID: 978902393655310741}
- component: {fileID: 978902393655310742}
m_Layer: 0
m_Name: Base-Corner-06-Collider
m_TagString: Untagged
@ -187612,28 +187782,6 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 978902393655310736}
m_Mesh: {fileID: 442311294554329864, guid: d90c450aba0ef964f9df263fdbeb23c3, type: 3}
--- !u!64 &978902393655310742
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 978902393655310736}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 5
m_Convex: 0
m_CookingOptions: 30
m_Mesh: {fileID: 442311294554329864, guid: d90c450aba0ef964f9df263fdbeb23c3, type: 3}
--- !u!4 &978902393655310743
Transform:
m_ObjectHideFlags: 0
@ -207828,7 +207976,6 @@ GameObject:
m_Component:
- component: {fileID: 978902393880935796}
- component: {fileID: 978902393880935802}
- component: {fileID: 978902393880935803}
m_Layer: 0
m_Name: BB-011-Collider
m_TagString: Untagged
@ -207844,28 +207991,6 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 978902393880935797}
m_Mesh: {fileID: 4300002, guid: afa08d921fc8175439eb2f9da86fe31f, type: 3}
--- !u!64 &978902393880935803
MeshCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 978902393880935797}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 5
m_Convex: 0
m_CookingOptions: 30
m_Mesh: {fileID: 4300002, guid: afa08d921fc8175439eb2f9da86fe31f, type: 3}
--- !u!108 &978902393881406213
Light:
m_ObjectHideFlags: 0

View File

@ -25,7 +25,7 @@ public class ConsumePowerManager : MonoBehaviour
confirmBt.onClick.AddListener(delegate
{
MotionEngine.GetModule<AnimationProcessManager>().HandleClick("临时用电");
MotionEngine.GetModule<AnimationProcessManager>().HandleClick("现场调试");
// MotionEngine.GetModule<AnimationProcessManager>().HandleClick("现场调试");
OnOpenLight();
});

View File

@ -7,7 +7,7 @@ namespace DefaultNamespace.Dto
public string Description { get; set; }
public float Score { get; set; }
public bool IsSequential { get; set; }
public bool IsUI{ get; set; }
public List<string> TargetObjects { get; set; }
}

View File

@ -82,5 +82,11 @@ public class IndicatorArrowComponent : MonoBehaviour
indicatorArrow.position = offScreenPos;
}
}
else
{
Vector3 offScreenPos = indicatorArrow.position;
offScreenPos.y = 9999;
indicatorArrow.position = offScreenPos;
}
}
}

View File

@ -15,8 +15,8 @@ namespace DefaultNamespace.ProcessMode
public bool FeedbackDisplayed { get; set; } // 是否已经显示过反馈
public string StepDescription { get; set; }
public ActionWithDescription(List<string> targetObjects, Action action, string description, bool isSequential, string stepDescription)
public bool IsUI{ get; set; }
public ActionWithDescription(List<string> targetObjects, Action action, string description, bool isSequential, string stepDescription,bool isUI)
{
TargetObjects = targetObjects ?? new List<string>();
Action = action;
@ -26,6 +26,7 @@ namespace DefaultNamespace.ProcessMode
CurrentObjectIndex = 0; // 初始化为第一个对象
FeedbackDisplayed = false; // 初始化反馈未显示
IsUI = isUI;
StepDescription = stepDescription;
}
}

View File

@ -29,10 +29,15 @@ namespace DefaultNamespace.ProcessMode
public AnimationProcess CurrentProcess => _processes[_currentMode.ToString()];
public delegate void CompleteEventHandler(int score);
public delegate void UIEventHandler();
public delegate void StepProcessDescriptionMessage(string message);
public delegate void StepProcessMessage(string message);
public delegate void TeachingPromptsObjects(GameObject gameObj);
public delegate void TeachingMessagePrompt(string message);
/// <summary>
@ -56,6 +61,7 @@ namespace DefaultNamespace.ProcessMode
/// 步骤描述
/// </summary>
public event StepProcessDescriptionMessage OnStepProcessDescriptionMessage;
// /// <summary>
// /// 教学模式提示
// /// </summary>
@ -96,8 +102,10 @@ namespace DefaultNamespace.ProcessMode
Debug.Log($"步骤 {stepIndex + 1} 错误点击的物体: {clickedObject}");
}
public void HandleClick(string clickedObject)
public bool HandleClick(string clickedObject)
{
Debug.Log("点击得物体--->"+clickedObject);
string type = _currentMode.ToString();
if (_processes.ContainsKey(type))
@ -108,81 +116,125 @@ namespace DefaultNamespace.ProcessMode
{
AnimationStep step = process.Steps[_currentStepIndex];
ActionWithDescription currentAction = step.Actions[_currentActionIndex];
if (currentAction.IsSequential)
if (_currentMode == ProcessMode.Teaching)
{
// 按顺序点击的逻辑
if (currentAction.CurrentObjectIndex < currentAction.TargetObjects.Count &&
currentAction.TargetObjects[currentAction.CurrentObjectIndex] == clickedObject)
// 强制有序处理
if (currentAction.TargetObjects[currentAction.CurrentObjectIndex].Equals(clickedObject))
{
Debug.Log($"正确点击了:{clickedObject}");
currentAction.CurrentObjectIndex++; // 正确点击,递增对象索引
currentAction.ClickedObjects.Add(clickedObject); // 添加到已点击对象集合
HandleModeFeedback(_currentMode, currentAction); // 处理模式特定的反馈
if (currentAction.CurrentObjectIndex >= currentAction.TargetObjects.Count)
{
CompleteAction(step, currentAction); // 完成当前动作
}
ProcessCorrectClick(step, currentAction, clickedObject);
return true;
}
else
{
// 输出错误信息,提示正确的点击对象
string correctObjectName = currentAction.TargetObjects[currentAction.CurrentObjectIndex];
Debug.Log($"错误点击或顺序错误{clickedObject}。正确的物体是:{correctObjectName}");
OnStepProcessDescriptionMessage?.Invoke($"<color=red>错误点击</color>,正确{correctObjectName}");
AddIncorrectClick(_currentStepIndex, clickedObject);
Debug.Log($"错误点击:{clickedObject}。正确的物体是:{correctObjectName}");
OnStepProcessDescriptionMessage?.Invoke($"<color=red>错误点击</color>,正确对象:{correctObjectName}");
return false;
}
}
else
{
// 不按顺序点击的逻辑
if (currentAction.TargetObjects.Any(obj => obj == clickedObject))
if (currentAction.IsSequential)
{
if (currentAction.ClickedObjects.Any(obj => obj == clickedObject))
{
Debug.Log($"错误点击:{clickedObject}。这个物体已经点击过。");
OnStepProcessDescriptionMessage?.Invoke($"<color=red>错误点击:</color>{clickedObject}。这个物体已经点击过。");
return; // 如果物体已经点击过,不继续处理
}
if (!currentAction.ClickedObjects.Contains(clickedObject))
// 按顺序点击的逻辑
if (currentAction.CurrentObjectIndex < currentAction.TargetObjects.Count &&
currentAction.TargetObjects[currentAction.CurrentObjectIndex] == clickedObject)
{
Debug.Log($"正确点击了:{clickedObject}");
currentAction.ClickedObjects.Add(clickedObject); // 添加到已点击对象集合
currentAction.CurrentObjectIndex++;
HandleModeFeedback(_currentMode, currentAction); // 处理模式特定的反馈
if (currentAction.ClickedObjects.Count >= currentAction.TargetObjects.Count)
currentAction.CurrentObjectIndex++; // 正确点击,递增对象索引
currentAction.ClickedObjects.Add(clickedObject); // 添加到已点击对象集合
HandleModeFeedback(_currentMode, currentAction); // 处理模式特定的反馈
if (currentAction.CurrentObjectIndex >= currentAction.TargetObjects.Count)
{
CompleteAction(step, currentAction); // 完成当前动作
}
return true;
}
else
{
string correctObjectName = currentAction.TargetObjects[currentAction.CurrentObjectIndex];
Debug.Log($"错误点击或顺序错误:{clickedObject}。正确的物体是:{correctObjectName}");
OnStepProcessDescriptionMessage?.Invoke($"<color=red>错误点击</color>,正确:{correctObjectName}");
AddIncorrectClick(_currentStepIndex, clickedObject);
return false;
}
}
else
{
Debug.Log($"错误点击:{clickedObject}");
List<string> correctObjectNames = new List<string>();
foreach (var obj in currentAction.TargetObjects)
// 不按顺序点击的逻辑
if (currentAction.TargetObjects.Any(obj => obj == clickedObject))
{
if (!currentAction.ClickedObjects.Contains(obj))
if (currentAction.ClickedObjects.Any(obj => obj == clickedObject))
{
correctObjectNames.Add(obj);
Debug.Log($"错误点击:{clickedObject}。这个物体已经点击过。");
OnStepProcessDescriptionMessage?.Invoke($"<color=red>错误点击:</color>{clickedObject}。这个物体已经点击过。");
return true; // 如果物体已经点击过,不继续处理
}
if (!currentAction.ClickedObjects.Contains(clickedObject))
{
Debug.Log($"正确点击了:{clickedObject}");
currentAction.ClickedObjects.Add(clickedObject); // 添加到已点击对象集合
currentAction.CurrentObjectIndex++;
HandleModeFeedback(_currentMode, currentAction); // 处理模式特定的反馈
if (currentAction.ClickedObjects.Count >= currentAction.TargetObjects.Count)
{
CompleteAction(step, currentAction); // 完成当前动作
}
return true;
}
}
else
{
Debug.Log($"错误点击:{clickedObject}");
List<string> correctObjectNames = new List<string>();
foreach (var obj in currentAction.TargetObjects)
{
if (!currentAction.ClickedObjects.Contains(obj))
{
correctObjectNames.Add(obj);
}
}
string correctObjects = string.Join(",", correctObjectNames);
Debug.Log($"正确的物体是:{correctObjects}");
OnStepProcessDescriptionMessage?.Invoke($"<color=red>错误点击</color>,正确:{correctObjects}");
AddIncorrectClick(_currentStepIndex, clickedObject);
string correctObjects = string.Join(",", correctObjectNames);
Debug.Log($"正确的物体是:{correctObjects}");
OnStepProcessDescriptionMessage?.Invoke($"<color=red>错误点击</color>,正确:{correctObjects}");
AddIncorrectClick(_currentStepIndex, clickedObject);
return false;
}
}
}
}
}
}
return false;
}
private void ProcessCorrectClick(AnimationStep step, ActionWithDescription currentAction, string clickedObject)
{
Debug.Log($"正确点击了:{clickedObject}");
currentAction.ClickedObjects.Add(clickedObject);
currentAction.CurrentObjectIndex++;
if (currentAction.CurrentObjectIndex >= currentAction.TargetObjects.Count)
{
CompleteAction(step, currentAction);
}
else
{
// 更新UI或其他元素以显示下一个目标对象
HighlightNextObject(currentAction);
}
}
/// <summary>
/// 处理完成当前动作的逻辑
/// </summary>
@ -362,7 +414,14 @@ namespace DefaultNamespace.ProcessMode
OnStepProcessMessage?.Invoke("提示:" + action.StepDescription);
OnStepProcessDescriptionMessage?.Invoke($"{action.Description}{nextObject}");
// TeachingMessagePromptEvent?.Invoke($"{action.Description} <size=30>{nextObject}</size>");
HighlightObject(nextObject);
if (action.IsUI)
{
OnTeachingPromptsObjects?.Invoke(null);
}
else
{
HighlightObject(nextObject);
}
break;
}
}
@ -374,7 +433,17 @@ namespace DefaultNamespace.ProcessMode
OnStepProcessMessage?.Invoke("提示:" + action.StepDescription);
OnStepProcessDescriptionMessage?.Invoke($"{action.Description}{nextObject}");
// TeachingMessagePromptEvent?.Invoke($"{action.Description} <size=30><align=center>{nextObject}</align></size>");
HighlightObject(nextObject);
if (action.IsUI)
{
OnTeachingPromptsObjects?.Invoke(null);
}
else
{
HighlightObject(nextObject);
}
break;
}
}
@ -391,7 +460,7 @@ namespace DefaultNamespace.ProcessMode
try
{
var obj = GameObject.Find(objectName);
if (obj != null)
{
OnTeachingPromptsObjects?.Invoke(obj);
@ -427,8 +496,8 @@ namespace DefaultNamespace.ProcessMode
if (nextStepOrAction is ActionWithDescription practiceAction)
{
if (OnStepProcessMessage != null) OnStepProcessMessage(practiceAction.StepDescription);
OnStepProcessDescriptionMessage?.Invoke(practiceAction.StepDescription);
Debug.Log($"练习模式:{practiceAction.StepDescription}");
}
@ -605,7 +674,7 @@ namespace DefaultNamespace.ProcessMode
}
Action action = () => { };
actions.Add(new ActionWithDescription(targetObjects, action, actionData.Description, actionData.IsSequential, stepData.StepDescription));
actions.Add(new ActionWithDescription(targetObjects, action, actionData.Description, actionData.IsSequential, stepData.StepDescription,actionData.IsUI));
}
//通过接口获取分数数据

View File

@ -44,15 +44,14 @@ namespace ToolsPack
}
if ( MotionEngine.GetModule<ToolsPackManager>().GetToolsPackScene() == ToolsPackScene.)
if (MotionEngine.GetModule<ToolsPackManager>().GetToolsPackScene() == ToolsPackScene.)
{
MotionEngine.GetModule<AnimationProcessManager>().HandleClick(this.gameObject.name);
bool b = MotionEngine.GetModule<AnimationProcessManager>().HandleClick(this.gameObject.name);
if (IsClick)
MotionEngine.GetModule<ToolsPackManager>().AddToolsPack(this.name, this.gameObject);
this.gameObject.SetActive(false);
if (b)
this.gameObject.SetActive(false);
}
}
private void OnMouseEnter()

View File

@ -14,7 +14,7 @@ namespace ToolsPack
{
this.GetComponent<Button>().onClick.AddListener(delegate
{
MotionEngine.GetModule<AnimationProcessManager>().HandleClick("前往现场");
// MotionEngine.GetModule<AnimationProcessManager>().HandleClick("前往现场");
SceneManager.LoadScene(Scenename);
});
}

View File

@ -7,6 +7,7 @@
{
"description": "选择",
"score": 0,
"isUI": false,
"isSequential": true,
"targetObjects": [
"工作单"
@ -21,6 +22,7 @@
{
"description": "领取",
"score": 30,
"isUI": false,
"isSequential": false,
"targetObjects": [
"螺丝刀",
@ -32,7 +34,7 @@
"纱布手套",
"工作服",
"l型集中器",
"梯子",
"梯子",
"工作证"
]
}
@ -45,6 +47,7 @@
{
"description": "佩戴装备前往",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"梳妆镜"
@ -59,6 +62,7 @@
{
"description": "点击按钮 ",
"score": 0,
"isUI": true,
"isSequential": false,
"targetObjects": [
"前往现场"
@ -73,6 +77,7 @@
{
"description": "前往",
"score": 0,
"isUI": true,
"isSequential": true,
"targetObjects": [
"Man_stand"
@ -87,10 +92,11 @@
{
"description": "验电笔验电",
"score": 0,
"isUI": false,
"isSequential": true,
"targetObjects": [
"插座",
"变电箱_门",
"箱体",
"插座"
]
}
@ -103,6 +109,7 @@
{
"description": "剥线钳打开",
"score": 0,
"isUI": false,
"isSequential": true,
"targetObjects": [
"柜门_封印"
@ -117,6 +124,7 @@
{
"description": "剥线钳更换",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"接线盒_封印R",
@ -132,6 +140,7 @@
{
"description": "螺丝刀扭开",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"盖_固定螺丝_Rup",
@ -147,6 +156,7 @@
{
"description": "滑动",
"score": 0,
"isUI": false,
"isSequential": true,
"targetObjects": [
"接线盒纵向滑块004",
@ -167,6 +177,7 @@
{
"description": "螺丝刀扭开",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"集中器_封印R",
@ -184,6 +195,7 @@
{
"description": "螺丝刀扭开",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"JZQ_螺丝001",
@ -207,6 +219,7 @@
{
"description": "绝缘胶带绑",
"score": 0,
"isUI": false,
"isSequential": true,
"targetObjects": [
"pCylinder170"
@ -221,6 +234,7 @@
{
"description": "螺丝刀扭开",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"固定螺丝_Rdown",
@ -236,6 +250,7 @@
{
"description": "更换",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"新的集中器碰撞"
@ -250,6 +265,7 @@
{
"description": "螺丝刀上",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"JZQ_螺丝001",
@ -269,6 +285,7 @@
{
"description": "打开",
"score": 0,
"isUI": true,
"isSequential": false,
"targetObjects": [
"临时用电"
@ -283,6 +300,7 @@
{
"description": "加装封印",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"透明盖子封印碰撞R",
@ -298,6 +316,7 @@
{
"description": "加装封印",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"盖_透明外壳"
@ -312,6 +331,7 @@
{
"description": "加装封印",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"变电箱_门"
@ -326,6 +346,7 @@
{
"description": "加装封印",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"柜门卡栓"

View File

@ -7,6 +7,7 @@
{
"description": "选择",
"score": 0,
"isUI": false,
"isSequential": true,
"targetObjects": [
"工作单"
@ -21,6 +22,7 @@
{
"description": "领取",
"score": 30,
"isUI": false,
"isSequential": false,
"targetObjects": [
"螺丝刀",
@ -45,6 +47,7 @@
{
"description": "佩戴装备前往",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"梳妆镜"
@ -59,6 +62,7 @@
{
"description": "点击按钮 ",
"score": 0,
"isUI": true,
"isSequential": false,
"targetObjects": [
"前往现场"
@ -73,6 +77,7 @@
{
"description": "前往",
"score": 0,
"isUI": true,
"isSequential": true,
"targetObjects": [
"Man_stand"
@ -87,10 +92,11 @@
{
"description": "验电笔验电",
"score": 0,
"isUI": false,
"isSequential": true,
"targetObjects": [
"插座",
"变电箱_门",
"箱体",
"插座"
]
}
@ -101,8 +107,9 @@
"score": 3.11,
"actions": [
{
"description": "柜门封印",
"description": "剥线钳打开",
"score": 0,
"isUI": false,
"isSequential": true,
"targetObjects": [
"柜门_封印"
@ -115,8 +122,9 @@
"score": 3.11,
"actions": [
{
"description": "更换集中器",
"description": "剥线钳更换",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"接线盒_封印R",
@ -130,8 +138,9 @@
"score": 3.11,
"actions": [
{
"description": "更换集中器",
"description": "螺丝刀扭开",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"盖_固定螺丝_Rup",
@ -145,8 +154,9 @@
"score": 3.11,
"actions": [
{
"description": "更换集中器",
"description": "滑动",
"score": 0,
"isUI": false,
"isSequential": true,
"targetObjects": [
"接线盒纵向滑块004",
@ -165,8 +175,9 @@
"score": 3.11,
"actions": [
{
"description": "更换集中器",
"description": "螺丝刀扭开",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"集中器_封印R",
@ -182,8 +193,9 @@
"score": 3.11,
"actions": [
{
"description": "更换集中器",
"description": "螺丝刀扭开",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"JZQ_螺丝001",
@ -205,8 +217,9 @@
"score": 3.11,
"actions": [
{
"description": "更换集中器",
"description": "绝缘胶带绑",
"score": 0,
"isUI": false,
"isSequential": true,
"targetObjects": [
"pCylinder170"
@ -219,8 +232,9 @@
"score": 3.11,
"actions": [
{
"description": "更换集中器",
"description": "螺丝刀扭开",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"固定螺丝_Rdown",
@ -234,8 +248,9 @@
"score": 3.11,
"actions": [
{
"description": "更换集中器",
"description": "更换",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"新的集中器碰撞"
@ -248,8 +263,9 @@
"score": 3.12,
"actions": [
{
"description": "更换集中器",
"description": "螺丝刀上",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"JZQ_螺丝001",
@ -267,8 +283,9 @@
"score": 5,
"actions": [
{
"description": "现场调试",
"description": "打开",
"score": 0,
"isUI": true,
"isSequential": false,
"targetObjects": [
"临时用电"
@ -276,20 +293,6 @@
}
]
},
{
"stepDescription": "现场调试",
"score": 5,
"actions": [
{
"description": "现场调试",
"score": 0,
"isSequential": false,
"targetObjects": [
"现场调试"
]
}
]
},
{
"stepDescription": "加装封印",
"score": 1.4,
@ -297,6 +300,7 @@
{
"description": "加装封印",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"透明盖子封印碰撞R",
@ -312,6 +316,7 @@
{
"description": "加装封印",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"盖_透明外壳"
@ -326,6 +331,7 @@
{
"description": "加装封印",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"变电箱_门"
@ -340,6 +346,7 @@
{
"description": "加装封印",
"score": 0,
"isUI": false,
"isSequential": false,
"targetObjects": [
"柜门卡栓"

View File

@ -70,18 +70,15 @@ public class concentrator : MonoBehaviour
public GameObject[] ScrewObj;
public GameObject ͸Ã÷¸Ç×Ó·âÓ¡ÅöײR;
public GameObject ͸Ã÷¸Ç×Ó·âÓ¡ÅöײL;
bool isplaying = true;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
@ -98,49 +95,77 @@ public class concentrator : MonoBehaviour
{
ConcentratorObj.gameObject.transform.SetParent(null);
StartCoroutine(Newconcentrator());
Debug.Log(hit.collider.gameObject.name);
Debug.Log(hit.collider.gameObject.name);
MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject.name);
͸Ã÷¸Ç×Ó·âÓ¡ÅöײR.GetComponent<BoxCollider>().enabled = true;
͸Ã÷¸Ç×Ó·âÓ¡ÅöײL.GetComponent<BoxCollider>().enabled = true;
}
for (int i = 0; i < ScrewObj.Length; i++)
if (hit.collider.gameObject.name == "JZQ_ÂÝË¿001")
{
if (hit.collider.gameObject.name == ScrewObj[i].name)
{
Debug.Log(hit.collider.gameObject.name);
//StartCoroutine(IEHubSegmentRowScrews());
ScrewObj[i].GetComponent<MeshRenderer>().enabled = true;
if (ScrewObj[0].GetComponent<MeshRenderer>().enabled & ScrewObj[1].GetComponent<MeshRenderer>().enabled)
{
StartCoroutine(TapeBackFrist()); MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject.name);
}
if (ScrewObj[2].GetComponent<MeshRenderer>().enabled & ScrewObj[3].GetComponent<MeshRenderer>().enabled)
{
StartCoroutine(TapeBackSecond()); MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject.name);
}
if (ScrewObj[4].GetComponent<MeshRenderer>().enabled & ScrewObj[5].GetComponent<MeshRenderer>().enabled)
{
StartCoroutine(TapeBackThird()); MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject.name);
}
if (ScrewObj[6].GetComponent<MeshRenderer>().enabled & ScrewObj[7].GetComponent<MeshRenderer>().enabled)
{
StartCoroutine(TapeBackFourth()); MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject.name);
}
if (ScrewObj[8].GetComponent<MeshRenderer>().enabled)
{
StartCoroutine(TapeBackFifth()); MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject.name);
}
if (ScrewObj[9].GetComponent<MeshRenderer>().enabled)
{
StartCoroutine(TapeBackSixth()); MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject.name);
}
}
ScrewObj[0].GetComponent<MeshRenderer>().enabled = true;
ScrewObj[1].GetComponent<MeshRenderer>().enabled = true;MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject.name);
}
else if (hit.collider.gameObject.name == "JZQ_ÂÝË¿002")
{
ScrewObj[2].GetComponent<MeshRenderer>().enabled = true;
ScrewObj[3].GetComponent<MeshRenderer>().enabled = true;MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject.name);
}
else if (hit.collider.gameObject.name == "JZQ_ÂÝË¿003")
{
ScrewObj[4].GetComponent<MeshRenderer>().enabled = true;
ScrewObj[5].GetComponent<MeshRenderer>().enabled = true;MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject.name);
}
else if (hit.collider.gameObject.name == "JZQ_ÂÝË¿004")
{
ScrewObj[6].GetComponent<MeshRenderer>().enabled = true;
ScrewObj[7].GetComponent<MeshRenderer>().enabled = true;MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject.name);
}
else if (hit.collider.gameObject.name == "JZQ_ÂÝË¿006")
{
ScrewObj[8].GetComponent<MeshRenderer>().enabled = true;MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject.name);
}
else if (hit.collider.gameObject.name == "JZQ_ÂÝË¿007")
{
ScrewObj[9].GetComponent<MeshRenderer>().enabled = true;MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject.name);
}
// for (int i = 0; i < ScrewObj.Length; i++)
// {
// if (hit.collider.gameObject.name == ScrewObj[i].name)
// {
// Debug.Log(hit.collider.gameObject.name);
// //StartCoroutine(IEHubSegmentRowScrews());
// ScrewObj[i].GetComponent<MeshRenderer>().enabled = true;
// if (ScrewObj[0].GetComponent<MeshRenderer>().enabled & ScrewObj[1].GetComponent<MeshRenderer>().enabled)
// {
// StartCoroutine(TapeBackFrist()); MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject.name);
// }
// if (ScrewObj[2].GetComponent<MeshRenderer>().enabled & ScrewObj[3].GetComponent<MeshRenderer>().enabled)
// {
// StartCoroutine(TapeBackSecond()); MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject.name);
// }
// if (ScrewObj[4].GetComponent<MeshRenderer>().enabled & ScrewObj[5].GetComponent<MeshRenderer>().enabled)
// {
// StartCoroutine(TapeBackThird()); MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject.name);
// }
// if (ScrewObj[6].GetComponent<MeshRenderer>().enabled & ScrewObj[7].GetComponent<MeshRenderer>().enabled)
// {
// StartCoroutine(TapeBackFourth()); MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject.name);
// }
// if (ScrewObj[8].GetComponent<MeshRenderer>().enabled)
// {
// StartCoroutine(TapeBackFifth()); MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject.name);
// }
// if (ScrewObj[9].GetComponent<MeshRenderer>().enabled)
// {
// StartCoroutine(TapeBackSixth()); MotionEngine.GetModule<AnimationProcessManager>().HandleClick(hit.collider.gameObject.name);
// }
// }
// }
if (AreAllObjectsHidden())
{
isPlayAni = false;
@ -155,9 +180,6 @@ public class concentrator : MonoBehaviour
}
//if (hit.collider.gameObject.name == "pCylinder170")
//{
// if (isplaying)
@ -168,7 +190,6 @@ public class concentrator : MonoBehaviour
//}
}
}
}
/// <summary>
@ -186,7 +207,8 @@ public class concentrator : MonoBehaviour
allls++;
}
}
if (allls >=ScrewObj.Length )
if (allls >= ScrewObj.Length)
{
StartCoroutine(IEElectricWire());
return true;
@ -203,7 +225,7 @@ public class concentrator : MonoBehaviour
/// <returns></returns>
IEnumerator Newconcentrator()
{
ConcentratorObj.gameObject.transform.DOLocalMove(oncentratorTrans.gameObject.transform.localPosition, 1f);//3.0778f, 2.2149f, -1.4581f
ConcentratorObj.gameObject.transform.DOLocalMove(oncentratorTrans.gameObject.transform.localPosition, 1f); //3.0778f, 2.2149f, -1.4581f
yield return new WaitForSeconds(1f);
}
@ -217,7 +239,7 @@ public class concentrator : MonoBehaviour
yield return new WaitForSeconds(1f);
Cover.gameObject.SetActive(true);
yield return new WaitForSeconds(0.5f);
Cover.gameObject.transform.DOLocalMove(new Vector3(0, 0.01672375f, -0.09654188f),1f);
Cover.gameObject.transform.DOLocalMove(new Vector3(0, 0.01672375f, -0.09654188f), 1f);
yield return new WaitForSeconds(1.1f);
screw[0].gameObject.SetActive(true);
yield return new WaitForSeconds(1.0f);
@ -231,16 +253,16 @@ public class concentrator : MonoBehaviour
IEnumerator TapeBackFrist()
{
TapeMar.SetFloat("_step_p1", 0);
if (ElectricWireSMR.GetBlendShapeWeight(0)!=0&& ElectricWireSMR.GetBlendShapeWeight(0)==100)
if (ElectricWireSMR.GetBlendShapeWeight(0) != 0 && ElectricWireSMR.GetBlendShapeWeight(0) == 100)
{
for (int i = 100; i >= 0; i--)
{
yield return new WaitForSeconds(0.01f);
ElectricWireSMR.SetBlendShapeWeight(0, i);
}
for (int i = 100; i >= 0; i--)
{
yield return new WaitForSeconds(0.01f);
ElectricWireSMR.SetBlendShapeWeight(0, i);
}
}
}
IEnumerator TapeBackSecond()
{
TapeMar.SetFloat("_step_p2", 0);
@ -253,6 +275,7 @@ public class concentrator : MonoBehaviour
}
}
}
IEnumerator TapeBackThird()
{
TapeMar.SetFloat("_step_p3", 0);
@ -265,6 +288,7 @@ public class concentrator : MonoBehaviour
}
}
}
IEnumerator TapeBackFourth()
{
TapeMar.SetFloat("_step_p4", 0);
@ -277,6 +301,7 @@ public class concentrator : MonoBehaviour
}
}
}
IEnumerator TapeBackFifth()
{
TapeMar.SetFloat("_step_p5", 0);
@ -289,6 +314,7 @@ public class concentrator : MonoBehaviour
}
}
}
IEnumerator TapeBackSixth()
{
TapeMar.SetFloat("_step_p6", 0);
@ -309,7 +335,7 @@ public class concentrator : MonoBehaviour
/// <returns></returns>
//IEnumerator IETapeBackFrist()
//{
// yield return new WaitForSeconds(1f);
// TapeMar.SetFloat("_step_p6", 0);
// yield return new WaitForSeconds(1f);
@ -324,4 +350,4 @@ public class concentrator : MonoBehaviour
// TapeMar.SetFloat("_step_p1", 0);
// yield return new WaitForSeconds(1f);
//}
}
}

View File

@ -16,6 +16,7 @@ public class CompleteOverComponent : MonoBehaviour
void Start()
{
MotionEngine.GetModule<AnimationProcessManager>().HandleClick("前往现场");
MotionEngine.GetModule<AnimationProcessManager>().OnCompleteEvent += CompleteEvent;
}

View File

@ -58,7 +58,7 @@ public class ElectricCheckPen : MonoBehaviour
if (raycast)
{
if (hit.collider.gameObject.name == "±äµçÏä_ÃÅ")
if (hit.collider.gameObject.name == "ÏäÌå")
{
ElectricCheckPenOBJ.gameObject.transform.SetParent(null);
ElectricCheckPenOBJ.gameObject.transform.DOLocalMove(new Vector3(303.038f, 2.655f, 163.822f), 2f);
@ -97,7 +97,7 @@ public class ElectricCheckPen : MonoBehaviour
{
//ElectricCheckPenOBJ.gameObject.transform.DOLocalRotate(new Vector3(20.78f, 72.47f, 171.503f), 1.5f).OnComplete(() =>
//{
Debug.Log("123");
// Debug.Log("123");
Warninglight();
//});
});