门交互
This commit is contained in:
parent
8bb14907e1
commit
316a5c2b8f
|
@ -3651,6 +3651,178 @@ BoxCollider:
|
|||
serializedVersion: 2
|
||||
m_Size: {x: 0.7044029, y: 0.224, z: 2.275163}
|
||||
m_Center: {x: 0.35220146, y: 0.022552505, z: 0.053770185}
|
||||
--- !u!114 &1098836247
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1098836241}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
profile: {fileID: 0}
|
||||
profileSync: 0
|
||||
camerasLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
effectGroup: 0
|
||||
effectGroupLayer:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
effectNameFilter:
|
||||
combineMeshes: 0
|
||||
alphaCutOff: 0.5
|
||||
cullBackFaces: 0
|
||||
ignoreObjectVisibility: 0
|
||||
reflectionProbes: 0
|
||||
GPUInstancing: 1
|
||||
optimizeSkinnedMesh: 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
|
||||
overlayVisibility: 0
|
||||
outline: 1
|
||||
outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, 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_NumColorKeys: 2
|
||||
m_NumAlphaKeys: 2
|
||||
outlineGradientInLocalSpace: 0
|
||||
outlineWidth: 0.45
|
||||
outlineBlurPasses: 2
|
||||
outlineQuality: 2
|
||||
outlineEdgeMode: 0
|
||||
outlineEdgeThreshold: 0.995
|
||||
outlineDownsampling: 2
|
||||
outlineVisibility: 0
|
||||
glowBlendMode: 0
|
||||
outlineBlitDebug: 0
|
||||
outlineIndependent: 0
|
||||
outlineContourStyle: 0
|
||||
glow: 0.48
|
||||
glowWidth: 0.4
|
||||
glowQuality: 2
|
||||
glowBlurMethod: 0
|
||||
glowDownsampling: 2
|
||||
glowHQColor: {r: 0.64, g: 1, b: 0, a: 1}
|
||||
glowDithering: 1
|
||||
glowMagicNumber1: 0.75
|
||||
glowMagicNumber2: 0.5
|
||||
glowAnimationSpeed: 1
|
||||
glowVisibility: 0
|
||||
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}
|
||||
innerGlowBlendMode: 0
|
||||
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: 1
|
||||
hitFxInitialIntensity: 0
|
||||
hitFxMode: 0
|
||||
hitFxFadeOutDuration: 0.25
|
||||
hitFxColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
hitFxRadius: 0.5
|
||||
--- !u!114 &1108802925 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 2576541080135006610, guid: 10f4454f32eb20e4298912d896f6020e, type: 3}
|
||||
|
@ -4177,6 +4349,178 @@ BoxCollider:
|
|||
serializedVersion: 2
|
||||
m_Size: {x: 0.7044029, y: 0.224, z: 2.275163}
|
||||
m_Center: {x: -0.35220146, y: 0.022552501, z: 0.053770185}
|
||||
--- !u!114 &1241040086
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1241040080}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 888380afc233049ce9e618f9f36c8ba8, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
profile: {fileID: 0}
|
||||
profileSync: 0
|
||||
camerasLayerMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
effectGroup: 0
|
||||
effectGroupLayer:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
effectNameFilter:
|
||||
combineMeshes: 0
|
||||
alphaCutOff: 0.5
|
||||
cullBackFaces: 0
|
||||
ignoreObjectVisibility: 0
|
||||
reflectionProbes: 0
|
||||
GPUInstancing: 1
|
||||
optimizeSkinnedMesh: 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
|
||||
overlayVisibility: 0
|
||||
outline: 1
|
||||
outlineColor: {r: 0.8080046, g: 1.6417967, b: 0.36961916, 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_NumColorKeys: 2
|
||||
m_NumAlphaKeys: 2
|
||||
outlineGradientInLocalSpace: 0
|
||||
outlineWidth: 0.45
|
||||
outlineBlurPasses: 2
|
||||
outlineQuality: 2
|
||||
outlineEdgeMode: 0
|
||||
outlineEdgeThreshold: 0.995
|
||||
outlineDownsampling: 2
|
||||
outlineVisibility: 0
|
||||
glowBlendMode: 0
|
||||
outlineBlitDebug: 0
|
||||
outlineIndependent: 0
|
||||
outlineContourStyle: 0
|
||||
glow: 0.48
|
||||
glowWidth: 0.4
|
||||
glowQuality: 2
|
||||
glowBlurMethod: 0
|
||||
glowDownsampling: 2
|
||||
glowHQColor: {r: 0.64, g: 1, b: 0, a: 1}
|
||||
glowDithering: 1
|
||||
glowMagicNumber1: 0.75
|
||||
glowMagicNumber2: 0.5
|
||||
glowAnimationSpeed: 1
|
||||
glowVisibility: 0
|
||||
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}
|
||||
innerGlowBlendMode: 0
|
||||
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: 1
|
||||
hitFxInitialIntensity: 0
|
||||
hitFxMode: 0
|
||||
hitFxFadeOutDuration: 0.25
|
||||
hitFxColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
hitFxRadius: 0.5
|
||||
--- !u!114 &1312876581 stripped
|
||||
MonoBehaviour:
|
||||
m_CorrespondingSourceObject: {fileID: 2576541080207224026, guid: 10f4454f32eb20e4298912d896f6020e, type: 3}
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using DG.Tweening;
|
||||
using HighlightPlus;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
@ -12,6 +13,7 @@ public class Door : MonoBehaviour
|
|||
public ZhouEnum zhouEnum;
|
||||
public float angele;
|
||||
public float duration;
|
||||
|
||||
|
||||
Dictionary<bool, Vector3> dic;
|
||||
[SerializeField]
|
||||
|
@ -19,10 +21,12 @@ public class Door : MonoBehaviour
|
|||
[SerializeField]
|
||||
private Vector3 nextR;
|
||||
|
||||
private HighlightEffect highlightEffect;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
GetEndAngle();
|
||||
highlightEffect = GetComponent<HighlightEffect>();
|
||||
}
|
||||
|
||||
private void OnMouseDown()
|
||||
|
@ -30,6 +34,15 @@ public class Door : MonoBehaviour
|
|||
isOpen = !isOpen;
|
||||
transform.DOLocalRotate(dic[isOpen], duration);
|
||||
}
|
||||
private void OnMouseEnter()
|
||||
{
|
||||
highlightEffect.SetHighlighted(true);
|
||||
}
|
||||
|
||||
private void OnMouseExit()
|
||||
{
|
||||
highlightEffect.SetHighlighted(false);
|
||||
}
|
||||
|
||||
private void GetEndAngle()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue