tijiao
This commit is contained in:
parent
0ad73446c4
commit
ee78b04d51
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1,8 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: ab77111953bebbc44af84a7f83c1f5a6
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 415 B |
|
|
@ -0,0 +1,108 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: c73993b66d3d23c48b15798267ac1167
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
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
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 0
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 1
|
||||||
|
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: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 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
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
|
|
@ -0,0 +1,108 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 813e1c2208548314da15186ad3850b16
|
||||||
|
TextureImporter:
|
||||||
|
internalIDToNameTable: []
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 11
|
||||||
|
mipmaps:
|
||||||
|
mipMapMode: 0
|
||||||
|
enableMipMap: 0
|
||||||
|
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
|
||||||
|
isReadable: 0
|
||||||
|
streamingMipmaps: 0
|
||||||
|
streamingMipmapsPriority: 0
|
||||||
|
vTOnly: 0
|
||||||
|
grayScaleToAlpha: 0
|
||||||
|
generateCubemap: 6
|
||||||
|
cubemapConvolution: 0
|
||||||
|
seamlessCubemap: 0
|
||||||
|
textureFormat: 1
|
||||||
|
maxTextureSize: 2048
|
||||||
|
textureSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
filterMode: 1
|
||||||
|
aniso: 1
|
||||||
|
mipBias: 0
|
||||||
|
wrapU: 1
|
||||||
|
wrapV: 1
|
||||||
|
wrapW: 0
|
||||||
|
nPOTScale: 0
|
||||||
|
lightmap: 0
|
||||||
|
compressionQuality: 50
|
||||||
|
spriteMode: 1
|
||||||
|
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: 1
|
||||||
|
spriteTessellationDetail: -1
|
||||||
|
textureType: 8
|
||||||
|
textureShape: 1
|
||||||
|
singleChannelComponent: 0
|
||||||
|
flipbookRows: 1
|
||||||
|
flipbookColumns: 1
|
||||||
|
maxTextureSizeSet: 0
|
||||||
|
compressionQualitySet: 0
|
||||||
|
textureFormatSet: 0
|
||||||
|
ignorePngGamma: 0
|
||||||
|
applyGammaDecoding: 0
|
||||||
|
platformSettings:
|
||||||
|
- serializedVersion: 3
|
||||||
|
buildTarget: DefaultTexturePlatform
|
||||||
|
maxTextureSize: 2048
|
||||||
|
resizeAlgorithm: 0
|
||||||
|
textureFormat: -1
|
||||||
|
textureCompression: 1
|
||||||
|
compressionQuality: 50
|
||||||
|
crunchedCompression: 0
|
||||||
|
allowsAlphaSplitting: 0
|
||||||
|
overridden: 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
|
||||||
|
androidETC2FallbackOverride: 0
|
||||||
|
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||||
|
spriteSheet:
|
||||||
|
serializedVersion: 2
|
||||||
|
sprites: []
|
||||||
|
outline: []
|
||||||
|
physicsShape: []
|
||||||
|
bones: []
|
||||||
|
spriteID: 5e97eb03825dee720800000000000000
|
||||||
|
internalID: 0
|
||||||
|
vertices: []
|
||||||
|
indices:
|
||||||
|
edges: []
|
||||||
|
weights: []
|
||||||
|
secondaryTextures: []
|
||||||
|
spritePackingTag:
|
||||||
|
pSDRemoveMatte: 0
|
||||||
|
pSDShowRemoveMatteOption: 0
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
|
|
@ -129631,7 +129631,7 @@ GameObject:
|
||||||
- component: {fileID: 1632119361}
|
- component: {fileID: 1632119361}
|
||||||
- component: {fileID: 1632119360}
|
- component: {fileID: 1632119360}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: "\u7535\u52A8\u8F66\u7A7F\u884C"
|
m_Name: "\u7206\u80CE"
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
|
|
@ -129708,7 +129708,7 @@ Transform:
|
||||||
m_PrefabAsset: {fileID: 0}
|
m_PrefabAsset: {fileID: 0}
|
||||||
m_GameObject: {fileID: 1632119359}
|
m_GameObject: {fileID: 1632119359}
|
||||||
m_LocalRotation: {x: -0.0054255025, y: -0.99790126, z: 0.04666059, w: -0.04456973}
|
m_LocalRotation: {x: -0.0054255025, y: -0.99790126, z: 0.04666059, w: -0.04456973}
|
||||||
m_LocalPosition: {x: 200.54509, y: 0.93181205, z: 186.15575}
|
m_LocalPosition: {x: 200.54509, y: 0.93181205, z: 143.9}
|
||||||
m_LocalScale: {x: 4.0187, y: 1, z: 1}
|
m_LocalScale: {x: 4.0187, y: 1, z: 1}
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Threading.Tasks;
|
||||||
using Script;
|
using Script;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
|
|
@ -14,6 +15,7 @@ public class AccidentManager : MonoBehaviour
|
||||||
|
|
||||||
public Animation zuiwei;
|
public Animation zuiwei;
|
||||||
public Animator diandongcheren;
|
public Animator diandongcheren;
|
||||||
|
|
||||||
void Close()
|
void Close()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < uis.transform.Find("UI").childCount; i++)
|
for (int i = 0; i < uis.transform.Find("UI").childCount; i++)
|
||||||
|
|
@ -26,25 +28,25 @@ public class AccidentManager : MonoBehaviour
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public void Tr(Transform other, bool b = false)
|
public async Task Tr(Transform other, bool b = false)
|
||||||
{
|
{
|
||||||
triggerName = other.name;
|
triggerName = other.name;
|
||||||
|
|
||||||
|
|
||||||
if (other.transform.tag == "People")
|
if (other.transform.tag == "People")
|
||||||
{
|
{ await Task.Delay(TimeSpan.FromSeconds(1));
|
||||||
Close();
|
Close();
|
||||||
uis.SetActive(true);
|
uis.SetActive(true);
|
||||||
uis.transform.Find("UI").Find("撞倒行人").gameObject.SetActive(true);
|
uis.transform.Find("UI").Find("撞倒行人").gameObject.SetActive(true);
|
||||||
}
|
}
|
||||||
else if (other.name == "Box_Collider")
|
else if (other.name == "Box_Collider")
|
||||||
{
|
{ await Task.Delay(TimeSpan.FromSeconds(1));
|
||||||
Close();
|
Close();
|
||||||
uis.SetActive(true);
|
uis.SetActive(true);
|
||||||
uis.transform.Find("UI").Find("汽车追尾").gameObject.SetActive(true);
|
uis.transform.Find("UI").Find("汽车追尾").gameObject.SetActive(true);
|
||||||
}
|
}
|
||||||
else if (other.name == "爆胎")
|
else if (other.name == "爆胎")
|
||||||
{
|
{ await Task.Delay(TimeSpan.FromSeconds(1));
|
||||||
Close();
|
Close();
|
||||||
uis.SetActive(true);
|
uis.SetActive(true);
|
||||||
uis.transform.Find("UI").Find("爆胎").gameObject.SetActive(true);
|
uis.transform.Find("UI").Find("爆胎").gameObject.SetActive(true);
|
||||||
|
|
@ -53,10 +55,12 @@ public class AccidentManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
baotai[i].SetActive(true);
|
baotai[i].SetActive(true);
|
||||||
}
|
}
|
||||||
}else if (other.name == "礼让行人")
|
}
|
||||||
|
else if (other.name == "礼让行人")
|
||||||
{
|
{
|
||||||
if (b)
|
if (b)
|
||||||
{
|
{
|
||||||
|
await Task.Delay(TimeSpan.FromSeconds(1));
|
||||||
Close();
|
Close();
|
||||||
uis.SetActive(true);
|
uis.SetActive(true);
|
||||||
uis.transform.Find("UI").Find("礼让行人").gameObject.SetActive(true);
|
uis.transform.Find("UI").Find("礼让行人").gameObject.SetActive(true);
|
||||||
|
|
@ -66,19 +70,34 @@ public class AccidentManager : MonoBehaviour
|
||||||
{
|
{
|
||||||
carGearControl.mingdi = true;
|
carGearControl.mingdi = true;
|
||||||
}
|
}
|
||||||
}else if (other.name == "隧道汽车追尾")
|
}
|
||||||
|
else if (other.name == "隧道汽车追尾")
|
||||||
{
|
{
|
||||||
StartCoroutine(PlayAnimation());
|
StartCoroutine(PlayAnimation());
|
||||||
}else if (other.name == "电动车穿行")
|
}
|
||||||
|
else if (other.name == "电动车穿行")
|
||||||
{
|
{
|
||||||
StartCoroutine(diandongche());
|
StartCoroutine(diandongche());
|
||||||
}else if (other.name == "刹车失灵")
|
}
|
||||||
{
|
else if (other.name == "刹车失灵")
|
||||||
|
{ await Task.Delay(TimeSpan.FromSeconds(1));
|
||||||
Close();
|
Close();
|
||||||
uis.SetActive(true);
|
uis.SetActive(true);
|
||||||
uis.transform.Find("UI").Find("刹车失灵").gameObject.SetActive(true);
|
uis.transform.Find("UI").Find("刹车失灵").gameObject.SetActive(true);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
IEnumerator dengdai()
|
||||||
|
{
|
||||||
|
zuiwei.gameObject.SetActive(true);
|
||||||
|
|
||||||
|
zuiwei.Play("donghua");
|
||||||
|
// 等待动画播放完毕
|
||||||
|
yield return new WaitForSeconds(zuiwei["donghua"].length);
|
||||||
|
Close();
|
||||||
|
uis.SetActive(true);
|
||||||
|
uis.transform.Find("UI").Find("汽车追尾").gameObject.SetActive(true);
|
||||||
|
// 在这里编写动画播放完之后的代码
|
||||||
|
// 例如: Debug.Log("动画播放完成");
|
||||||
}
|
}
|
||||||
IEnumerator PlayAnimation()
|
IEnumerator PlayAnimation()
|
||||||
{
|
{
|
||||||
|
|
@ -93,6 +112,7 @@ public class AccidentManager : MonoBehaviour
|
||||||
// 在这里编写动画播放完之后的代码
|
// 在这里编写动画播放完之后的代码
|
||||||
// 例如: Debug.Log("动画播放完成");
|
// 例如: Debug.Log("动画播放完成");
|
||||||
}
|
}
|
||||||
|
|
||||||
IEnumerator diandongche()
|
IEnumerator diandongche()
|
||||||
{
|
{
|
||||||
diandongcheren.gameObject.SetActive(true);
|
diandongcheren.gameObject.SetActive(true);
|
||||||
|
|
@ -106,6 +126,7 @@ public class AccidentManager : MonoBehaviour
|
||||||
// 在这里编写动画播放完之后的代码
|
// 在这里编写动画播放完之后的代码
|
||||||
// 例如: Debug.Log("动画播放完成");
|
// 例如: Debug.Log("动画播放完成");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnTriggerEnter(Collider other)
|
private void OnTriggerEnter(Collider other)
|
||||||
{
|
{
|
||||||
Tr(other.transform);
|
Tr(other.transform);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue