This commit is contained in:
parent
abbcb42da0
commit
8c5178c17c
|
@ -64,6 +64,7 @@
|
|||
<Compile Include="Assets\EVP5\Scripts\VehicleManager.cs" />
|
||||
<Compile Include="Assets\Plugin\Standard Assets\Effects\ImageEffects\Scripts\ImageEffects.cs" />
|
||||
<Compile Include="Assets\Plugin\Standard Assets\Utility\DynamicShadowSettings.cs" />
|
||||
<Compile Include="Assets\Script\GateController.cs" />
|
||||
<Compile Include="Assets\EVP5\Scripts\VehicleController.cs" />
|
||||
<Compile Include="Assets\Plugin\Standard Assets\CrossPlatformInput\Scripts\ButtonHandler.cs" />
|
||||
<Compile Include="Assets\Plugin\Standard Assets\Utility\LerpControlledBob.cs" />
|
||||
|
@ -115,6 +116,7 @@
|
|||
<Compile Include="Assets\Plugin\Standard Assets\Vehicles\Car\Scripts\BrakeLight.cs" />
|
||||
<Compile Include="Assets\Plugin\Standard Assets\Vehicles\Aircraft\Scripts\JetParticleEffect.cs" />
|
||||
<Compile Include="Assets\Plugin\Standard Assets\Environment\Water (Basic)\Scripts\WaterBasic.cs" />
|
||||
<Compile Include="Assets\Script\DoorController.cs" />
|
||||
<Compile Include="Assets\Plugin\Standard Assets\Effects\ImageEffects\Scripts\Bloom.cs" />
|
||||
<Compile Include="Assets\UTS\Scripts\Another Script\RotateGameObject.cs" />
|
||||
<Compile Include="Assets\Plugin\XFrame\Core\UI\XUIRoot.cs" />
|
||||
|
@ -410,8 +412,6 @@
|
|||
<Compile Include="Assets\Script\Old\Trigger_road.cs" />
|
||||
<Compile Include="Assets\Script\Old\Early_Warning.cs" />
|
||||
<Compile Include="Assets\Script\Manaegr\CarTempManager.cs" />
|
||||
<Compile Include="Assets\Script\GateController.cs" />
|
||||
<Compile Include="Assets\Script\DoorController.cs" />
|
||||
<None Include="Assets\Plugin\Standard Assets\Effects\ImageEffects\Shaders\Tonemapper.shader" />
|
||||
<None Include="Assets\Plugin\Hard Surface Pro\HardSurface Shaders\HardSurfaceProScreenSpaceReflection.cginc" />
|
||||
<None Include="Assets\Plugin\Hard Surface Pro\HardSurface Shaders\HardSurface Free Opaque Specular.shader" />
|
||||
|
|
|
@ -943,8 +943,8 @@ Transform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1103061781233615414}
|
||||
m_LocalRotation: {x: -3.7493998e-33, y: -6.123234e-17, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 8.88, y: 1.32, z: -136.53}
|
||||
m_LocalScale: {x: 7.1287, y: 4.553939, z: 1.9917}
|
||||
m_LocalPosition: {x: 8.67, y: 1.32, z: -132.94}
|
||||
m_LocalScale: {x: 7.549293, y: 4.553939, z: 6.34}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 2080977185018652271}
|
||||
m_RootOrder: 11
|
||||
|
@ -3826,8 +3826,8 @@ Transform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3575635220137957818}
|
||||
m_LocalRotation: {x: -3.7493998e-33, y: -6.123234e-17, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 17.7, y: 1.32, z: -136.37}
|
||||
m_LocalScale: {x: 7.1287, y: 4.553939, z: 1.9917}
|
||||
m_LocalPosition: {x: 19.5, y: 1.32, z: -133.68}
|
||||
m_LocalScale: {x: 10.725129, y: 4.553939, z: 6.34}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3754593856869199415}
|
||||
m_RootOrder: 11
|
||||
|
@ -4032,8 +4032,8 @@ Transform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3722997025499302048}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: -17.5, y: 1.32, z: -100.63}
|
||||
m_LocalScale: {x: 7.1287, y: 4.553939, z: 1.9917}
|
||||
m_LocalPosition: {x: -19.21, y: 1.32, z: -112.61}
|
||||
m_LocalScale: {x: 10.539783, y: 4.553939, z: 6.34}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 8159294693412934162}
|
||||
m_RootOrder: 11
|
||||
|
@ -4239,8 +4239,8 @@ Transform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4030142108679120251}
|
||||
m_LocalRotation: {x: -3.7493998e-33, y: -6.123234e-17, z: -0, w: 1}
|
||||
m_LocalPosition: {x: -8.53, y: 1.3199997, z: -100.630005}
|
||||
m_LocalScale: {x: 7.1287, y: 4.553939, z: 1.9917}
|
||||
m_LocalPosition: {x: -8.53, y: 1.32, z: -109.55}
|
||||
m_LocalScale: {x: 7.1287, y: 4.553939, z: 6.34}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 7136885523355303906}
|
||||
m_RootOrder: 1
|
||||
|
|
|
@ -47647,7 +47647,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &152701625
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -148662,7 +148662,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!4 &463649141
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -150633,6 +150633,12 @@ Transform:
|
|||
m_Father: {fileID: 917995222}
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!33 &468594977 stripped
|
||||
MeshFilter:
|
||||
m_CorrespondingSourceObject: {fileID: 3371284, guid: 4292160a5e1fde347934ac660b2c5d30,
|
||||
type: 3}
|
||||
m_PrefabInstance: {fileID: 2037673174}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &468702952
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -169067,7 +169073,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &528661332
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -250383,7 +250389,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &802318044
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -371443,7 +371449,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1198207951
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -411338,8 +411344,8 @@ MonoBehaviour:
|
|||
carGearControl: {fileID: 1276762320}
|
||||
zuiwei: {fileID: 968945826}
|
||||
diandongcheren: {fileID: 1384190233}
|
||||
mesh: {fileID: 0}
|
||||
meshFilter: {fileID: 0}
|
||||
mesh: {fileID: -7193705671270685957, guid: efe2b86486a526a4e809023d89746bad, type: 3}
|
||||
meshFilter: {fileID: 468594977}
|
||||
--- !u!1 &1323235811
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -477205,7 +477211,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &1537967814
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
using EVP;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
using Button = UnityEngine.UI.Button;
|
||||
|
||||
namespace Script
|
||||
{
|
||||
|
@ -106,267 +107,279 @@ namespace Script
|
|||
//
|
||||
// carData = client.modbusQueue.Dequeue();
|
||||
|
||||
if (ModbusTcpClient.modbusTcpClient.modbusQueue.Count > 0)
|
||||
try
|
||||
{
|
||||
// Debug.Log(ModbusTcpClient.modbusTcpClient.modbusQueue.Count);
|
||||
|
||||
carData = ModbusTcpClient.modbusTcpClient.modbusQueue.Dequeue();
|
||||
|
||||
|
||||
//方向盘
|
||||
vehicleController.steerInput = NormalizeValue(carData.SteeringWheelAngle, minValue, maxValue);
|
||||
|
||||
//钥匙 00是熄火,1是通电,2是点火
|
||||
switch (carData.KeyStatus)
|
||||
if (ModbusTcpClient.modbusTcpClient.modbusQueue.Count > 0)
|
||||
{
|
||||
case 0:
|
||||
uiGame.SetActive(false);
|
||||
break;
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
if (carData.BrakePedalPosition > 30)
|
||||
{
|
||||
uiGame.SetActive(true);
|
||||
currentGear = 1;
|
||||
dianhuo = true;
|
||||
ui2d.SetActive(true);
|
||||
}
|
||||
// Debug.Log(ModbusTcpClient.modbusTcpClient.modbusQueue.Count);
|
||||
|
||||
break;
|
||||
}
|
||||
carData = ModbusTcpClient.modbusTcpClient.modbusQueue.Dequeue();
|
||||
|
||||
if (!dianhuo)
|
||||
continue;
|
||||
|
||||
//手刹
|
||||
// vehicleController.throttleInput = carData.HandbrakeStatus == 0 ? 1 : 0;
|
||||
//挡位 00空挡,1前进档,2倒挡,3为P档
|
||||
//当钥匙为点火状态,才能启动车
|
||||
if (carData.IgnitionSwitch == 1)
|
||||
{
|
||||
switch (carData.GearPosition)
|
||||
//方向盘
|
||||
vehicleController.steerInput = NormalizeValue(carData.SteeringWheelAngle, minValue, maxValue);
|
||||
|
||||
//钥匙 00是熄火,1是通电,2是点火
|
||||
switch (carData.KeyStatus)
|
||||
{
|
||||
case 0:
|
||||
uiGame.SetActive(false);
|
||||
break;
|
||||
case 1: //1前进档
|
||||
if (carData.HandbrakeStatus == 0)
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
if (carData.BrakePedalPosition > 30)
|
||||
{
|
||||
if (carData.AcceleratorPedalPosition > 20 && carData.AcceleratorPedalPosition <= 50)
|
||||
{
|
||||
vehicleController.throttleInput = 1;
|
||||
currentGear = 1;
|
||||
}
|
||||
else if (carData.AcceleratorPedalPosition > 50 && carData.AcceleratorPedalPosition <= 80)
|
||||
{ vehicleController.throttleInput = 1;
|
||||
currentGear = 2;
|
||||
}
|
||||
else if (carData.AcceleratorPedalPosition > 80 && carData.AcceleratorPedalPosition <= 100)
|
||||
{ vehicleController.throttleInput = 1;
|
||||
currentGear = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
vehicleController.throttleInput = 0;
|
||||
currentGear = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
vehicleController.throttleInput = 0;
|
||||
uiGame.SetActive(true);
|
||||
currentGear = 1;
|
||||
dianhuo = true;
|
||||
ui2d.SetActive(true);
|
||||
}
|
||||
|
||||
break;
|
||||
case 2: //2倒挡
|
||||
if (carData.HandbrakeStatus == 0)
|
||||
{
|
||||
if (carData.AcceleratorPedalPosition > 20)
|
||||
}
|
||||
|
||||
if (!dianhuo)
|
||||
continue;
|
||||
|
||||
//手刹
|
||||
// vehicleController.throttleInput = carData.HandbrakeStatus == 0 ? 1 : 0;
|
||||
//挡位 00空挡,1前进档,2倒挡,3为P档
|
||||
//当钥匙为点火状态,才能启动车
|
||||
if (carData.IgnitionSwitch == 1)
|
||||
{
|
||||
switch (carData.GearPosition)
|
||||
{
|
||||
case 0:
|
||||
break;
|
||||
case 1: //1前进档
|
||||
if (carData.HandbrakeStatus == 0)
|
||||
{
|
||||
vehicleController.throttleInput = -0.5f;
|
||||
if (carData.AcceleratorPedalPosition > 20 && carData.AcceleratorPedalPosition <= 50)
|
||||
{
|
||||
vehicleController.throttleInput = 1;
|
||||
currentGear = 1;
|
||||
}
|
||||
else if (carData.AcceleratorPedalPosition > 50 && carData.AcceleratorPedalPosition <= 80)
|
||||
{
|
||||
vehicleController.throttleInput = 1;
|
||||
currentGear = 2;
|
||||
}
|
||||
else if (carData.AcceleratorPedalPosition > 80 && carData.AcceleratorPedalPosition <= 100)
|
||||
{
|
||||
vehicleController.throttleInput = 1;
|
||||
currentGear = 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
vehicleController.throttleInput = 0;
|
||||
currentGear = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
vehicleController.throttleInput = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
vehicleController.throttleInput = 0;
|
||||
}
|
||||
|
||||
break;
|
||||
case 3:
|
||||
break;
|
||||
break;
|
||||
case 2: //2倒挡
|
||||
if (carData.HandbrakeStatus == 0)
|
||||
{
|
||||
if (carData.AcceleratorPedalPosition > 20)
|
||||
{
|
||||
vehicleController.throttleInput = -0.5f;
|
||||
}
|
||||
else
|
||||
{
|
||||
vehicleController.throttleInput = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
vehicleController.throttleInput = 0;
|
||||
}
|
||||
|
||||
break;
|
||||
case 3:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//转向灯 00是未开转向灯,1是左转向灯,2是右转向灯
|
||||
//当钥匙转为通电才能启动转向灯 0熄火,1通电,2启动
|
||||
// if (carData.IgnitionSwitch == 1)
|
||||
// {
|
||||
// switch (carData.TurnSignalStatus)
|
||||
// {
|
||||
// case 0:
|
||||
// carInfoManager.StopBlinking();
|
||||
// break;
|
||||
// case 1:
|
||||
// carInfoManager.LeftStartBlinking();
|
||||
// break;
|
||||
// case 2:
|
||||
// carInfoManager.RightStartBlinking();
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
//转向灯 00是未开转向灯,1是左转向灯,2是右转向灯
|
||||
//当钥匙转为通电才能启动转向灯 0熄火,1通电,2启动
|
||||
// if (carData.IgnitionSwitch == 1)
|
||||
// {
|
||||
// switch (carData.TurnSignalStatus)
|
||||
// {
|
||||
// case 0:
|
||||
// carInfoManager.StopBlinking();
|
||||
// break;
|
||||
// case 1:
|
||||
// carInfoManager.LeftStartBlinking();
|
||||
// break;
|
||||
// case 2:
|
||||
// carInfoManager.RightStartBlinking();
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
//上1,右2,下3,左4
|
||||
if (NewValue != carData.ButtonData)
|
||||
{
|
||||
NewValue = carData.ButtonData;
|
||||
CarMenuButton(NewValue);
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
|
||||
//雨刮器
|
||||
if (carData.WiperStatus == 2)
|
||||
{
|
||||
ygq.PlayAnimation("donghua");
|
||||
}
|
||||
else
|
||||
{
|
||||
ygq.StopAnimationLoop();
|
||||
}
|
||||
|
||||
|
||||
if (mingdi)
|
||||
{
|
||||
if (carData.HornStatus == 1)
|
||||
//上1,右2,下3,左4
|
||||
if (NewValue != carData.ButtonData)
|
||||
{
|
||||
mingdi = false;
|
||||
accidentManager.Tr(ttt, true);
|
||||
NewValue = carData.ButtonData;
|
||||
CarMenuButton(NewValue);
|
||||
}
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// continue;
|
||||
// }
|
||||
|
||||
//转向灯和双闪
|
||||
if (carData.ButtonData == 1)
|
||||
{
|
||||
if (!inputUp)
|
||||
//雨刮器
|
||||
if (carData.WiperStatus == 2)
|
||||
{
|
||||
inputUp = true;
|
||||
inputUpV = carData.TurnSignalStatus;
|
||||
ygq.PlayAnimation("donghua");
|
||||
}
|
||||
else
|
||||
{
|
||||
inputUp = false;
|
||||
inputUpV = -1;
|
||||
turnSignalController.rightTurnSignalGame.SetActive(false);
|
||||
turnSignalController.leftTurnSignalGame.SetActive(false);
|
||||
turnSignalController.SetSignal(0);
|
||||
ygq.StopAnimationLoop();
|
||||
}
|
||||
}
|
||||
|
||||
if (inputUpV == carData.TurnSignalStatus)
|
||||
{
|
||||
turnSignalController.SetSignal(3);
|
||||
}
|
||||
else
|
||||
{
|
||||
inputUpV = -1;
|
||||
switch (carData.TurnSignalStatus)
|
||||
|
||||
if (mingdi)
|
||||
{
|
||||
if (carData.HornStatus == 1)
|
||||
{
|
||||
mingdi = false;
|
||||
accidentManager.Tr(ttt, true);
|
||||
}
|
||||
}
|
||||
|
||||
//转向灯和双闪
|
||||
if (carData.ButtonData == 1)
|
||||
{
|
||||
if (!inputUp)
|
||||
{
|
||||
inputUp = true;
|
||||
inputUpV = carData.TurnSignalStatus;
|
||||
}
|
||||
else
|
||||
{
|
||||
inputUp = false;
|
||||
inputUpV = -1;
|
||||
turnSignalController.rightTurnSignalGame.SetActive(false);
|
||||
turnSignalController.leftTurnSignalGame.SetActive(false);
|
||||
turnSignalController.SetSignal(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (inputUpV == carData.TurnSignalStatus)
|
||||
{
|
||||
turnSignalController.SetSignal(3);
|
||||
}
|
||||
else
|
||||
{
|
||||
inputUpV = -1;
|
||||
switch (carData.TurnSignalStatus)
|
||||
{
|
||||
case 0:
|
||||
turnSignalController.SetSignal(0);
|
||||
break;
|
||||
case 1:
|
||||
turnSignalController.SetSignal(1);
|
||||
break;
|
||||
case 2:
|
||||
turnSignalController.SetSignal(2);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 灯光
|
||||
switch (carData.LightStatus)
|
||||
{
|
||||
case 0:
|
||||
turnSignalController.SetSignal(0);
|
||||
turnSignalController.CloseLight();
|
||||
break;
|
||||
case 1:
|
||||
turnSignalController.SetSignal(1);
|
||||
turnSignalController.OpenLight();
|
||||
break;
|
||||
case 2:
|
||||
turnSignalController.SetSignal(2);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 灯光
|
||||
switch (carData.LightStatus)
|
||||
{
|
||||
case 0:
|
||||
turnSignalController.CloseLight();
|
||||
break;
|
||||
case 1:
|
||||
turnSignalController.OpenLight();
|
||||
break;
|
||||
case 2:
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
if (accident.activeInHierarchy)
|
||||
{
|
||||
if (carData.AcceleratorPedalPosition > 90)
|
||||
if (accident.activeInHierarchy)
|
||||
{
|
||||
accident.transform.Find("重置").GetComponent<UnityEngine.UI.Button>().onClick.Invoke();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//踩离合弹出菜单UI
|
||||
if (carData.ClutchPedalPosition > 30)
|
||||
{
|
||||
if (!ClutchPedalPositionBool)
|
||||
if (carData.AcceleratorPedalPosition > 90)
|
||||
{
|
||||
ClutchPedalPositionBool = true;
|
||||
carMenuUI.SetActive(true);
|
||||
accident.transform.Find("重置").GetComponent<Button>().onClick.Invoke();
|
||||
}
|
||||
}
|
||||
else if (carData.ClutchPedalPosition <= 0)
|
||||
else
|
||||
{
|
||||
ClutchPedalPositionBool = false;
|
||||
//踩离合弹出菜单UI
|
||||
if (carData.ClutchPedalPosition > 30)
|
||||
{
|
||||
if (!ClutchPedalPositionBool)
|
||||
{
|
||||
ClutchPedalPositionBool = true;
|
||||
carMenuUI.SetActive(true);
|
||||
}
|
||||
}
|
||||
else if (carData.ClutchPedalPosition <= 0)
|
||||
{
|
||||
ClutchPedalPositionBool = false;
|
||||
}
|
||||
|
||||
if (carMenuUI.activeInHierarchy)
|
||||
{
|
||||
if (carData.ButtonData == 4)
|
||||
{
|
||||
carMenuUI.GetComponent<CarMenuManager>().Back();
|
||||
}
|
||||
else if (carData.ButtonData == 2)
|
||||
{
|
||||
carMenuUI.GetComponent<CarMenuManager>().Next();
|
||||
}
|
||||
|
||||
if (carData.AcceleratorPedalPosition > 30)
|
||||
{
|
||||
carMenuUI.GetComponent<CarMenuManager>().Click();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (carMenuUI.activeInHierarchy)
|
||||
//刹车
|
||||
if (carData.BrakePedalPosition > 30)
|
||||
{
|
||||
if (carData.ButtonData == 4)
|
||||
if (shache[0].activeInHierarchy)
|
||||
continue;
|
||||
for (int i = 0; i < shache.Length; i++)
|
||||
{
|
||||
carMenuUI.GetComponent<CarMenuManager>().Back();
|
||||
shache[i].SetActive(true);
|
||||
}
|
||||
else if (carData.ButtonData == 2)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!shache[0].activeInHierarchy)
|
||||
continue;
|
||||
for (int i = 0; i < shache.Length; i++)
|
||||
{
|
||||
carMenuUI.GetComponent<CarMenuManager>().Next();
|
||||
}
|
||||
|
||||
if (carData.AcceleratorPedalPosition > 30)
|
||||
{
|
||||
carMenuUI.GetComponent<CarMenuManager>().Click();
|
||||
shache[i].SetActive(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//刹车
|
||||
if (carData.BrakePedalPosition > 30)
|
||||
{
|
||||
if (shache[0].activeInHierarchy)
|
||||
continue;
|
||||
for (int i = 0; i < shache.Length; i++)
|
||||
{
|
||||
shache[i].SetActive(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!shache[0].activeInHierarchy)
|
||||
continue;
|
||||
for (int i = 0; i < shache.Length; i++)
|
||||
{
|
||||
shache[i].SetActive(false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
catch (Exception e)
|
||||
{
|
||||
// Console.WriteLine(e);
|
||||
// throw;
|
||||
}
|
||||
|
||||
await Task.Delay(TimeSpan.FromSeconds(.1));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ public class GateController : MonoBehaviour
|
|||
currentAnimation.Kill(); // 停止当前的动画
|
||||
}
|
||||
|
||||
currentAnimation = ganzi.transform.DOLocalRotate(new Vector3(0, 0, -90f), 1f); // 使用DoTween旋转开门
|
||||
currentAnimation = ganzi.transform.DOLocalRotate(new Vector3(0, ganzi.transform.localEulerAngles.y, -90f), 1f); // 使用DoTween旋转开门
|
||||
closeTimer = StartCoroutine(CloseDoorTimer()); // 重置并开始关门计时
|
||||
}
|
||||
}
|
||||
|
@ -58,6 +58,6 @@ public class GateController : MonoBehaviour
|
|||
currentAnimation.Kill(); // 停止当前的动画
|
||||
}
|
||||
|
||||
currentAnimation = ganzi.transform.DOLocalRotate(new Vector3(0, 0, 0f), 1f); // 使用DoTween旋转关门
|
||||
currentAnimation = ganzi.transform.DOLocalRotate(new Vector3(0, ganzi.transform.localEulerAngles.y, 0f), 1f); // 使用DoTween旋转关门
|
||||
}
|
||||
}
|
|
@ -4210,3 +4210,133 @@ Received Import Request.
|
|||
path: Assets/Script/GateController.cs
|
||||
artifactKey: Guid(b96c7568fc36d0c408e24576f2b54447) Importer(2089858483,934ff659095e30574adcf32a4c2f97b5)
|
||||
Start importing Assets/Script/GateController.cs using Guid(b96c7568fc36d0c408e24576f2b54447) Importer(2089858483,934ff659095e30574adcf32a4c2f97b5) -> (artifact id: 'f632701eab8f68d4f9de442e1f480002') in 0.077326 seconds
|
||||
========================================================================
|
||||
Received Import Request.
|
||||
Time since last request: 441.620033 seconds.
|
||||
path: Assets/Scenes/main_.unity
|
||||
artifactKey: Guid(2905cb1f57b5d7641adcaa938670a0cd) Importer(2089858483,934ff659095e30574adcf32a4c2f97b5)
|
||||
Start importing Assets/Scenes/main_.unity using Guid(2905cb1f57b5d7641adcaa938670a0cd) Importer(2089858483,934ff659095e30574adcf32a4c2f97b5) -> (artifact id: 'd5cefcc3a29e6d18902ab6024288482a') in 0.007575 seconds
|
||||
========================================================================
|
||||
Received Import Request.
|
||||
Time since last request: 2874.480661 seconds.
|
||||
path: Assets/GameAssets/Art/远景-山体/shan/yuanjing01.prefab
|
||||
artifactKey: Guid(f30d7febc0b48dd41b4cbd4d39f382d5) Importer(2089858483,934ff659095e30574adcf32a4c2f97b5)
|
||||
Start importing Assets/GameAssets/Art/远景-山体/shan/yuanjing01.prefab using Guid(f30d7febc0b48dd41b4cbd4d39f382d5) Importer(2089858483,934ff659095e30574adcf32a4c2f97b5) -> (artifact id: 'a667f9f59ea13bad69bf5b1de62f8122') in 0.010084 seconds
|
||||
========================================================================
|
||||
Received Import Request.
|
||||
Time since last request: 0.000128 seconds.
|
||||
path: Assets/Scenes/main_.unity
|
||||
artifactKey: Guid(2905cb1f57b5d7641adcaa938670a0cd) Importer(2089858483,934ff659095e30574adcf32a4c2f97b5)
|
||||
Start importing Assets/Scenes/main_.unity using Guid(2905cb1f57b5d7641adcaa938670a0cd) Importer(2089858483,934ff659095e30574adcf32a4c2f97b5) -> (artifact id: '116f5caec7e6fefe86f218468937e183') in 0.005386 seconds
|
||||
========================================================================
|
||||
Received Import Request.
|
||||
Time since last request: 204.104978 seconds.
|
||||
path: Assets/Scenes/main_.unity
|
||||
artifactKey: Guid(2905cb1f57b5d7641adcaa938670a0cd) Importer(2089858483,934ff659095e30574adcf32a4c2f97b5)
|
||||
Start importing Assets/Scenes/main_.unity using Guid(2905cb1f57b5d7641adcaa938670a0cd) Importer(2089858483,934ff659095e30574adcf32a4c2f97b5) -> (artifact id: 'ee6811e999696efb127a9eaf4bef9f16') in 0.005579 seconds
|
||||
========================================================================
|
||||
Received Import Request.
|
||||
Time since last request: 8.131735 seconds.
|
||||
path: Assets/Scenes/main_.unity
|
||||
artifactKey: Guid(2905cb1f57b5d7641adcaa938670a0cd) Importer(2089858483,934ff659095e30574adcf32a4c2f97b5)
|
||||
Start importing Assets/Scenes/main_.unity using Guid(2905cb1f57b5d7641adcaa938670a0cd) Importer(2089858483,934ff659095e30574adcf32a4c2f97b5) -> (artifact id: '30f5fd02b9d6eee34e484d4e7f35b7bf') in 0.008516 seconds
|
||||
========================================================================
|
||||
Received Prepare
|
||||
Shader 'Custom/EVP Particles Alpha Blended Shadows': fallback shader 'Particles/Alpha Blended' not found
|
||||
Refreshing native plugins compatible for Editor in 7.78 ms, found 8 plugins.
|
||||
Preloading 0 native plugins for Editor in 0.00 ms.
|
||||
Unloading 97 Unused Serialized files (Serialized files now loaded: 0)
|
||||
System memory in use before: 158.5 MB.
|
||||
System memory in use after: 146.4 MB.
|
||||
|
||||
Unloading 97 unused Assets to reduce memory usage. Loaded Objects now: 5042.
|
||||
Total: 11.633200 ms (FindLiveObjects: 0.457100 ms CreateObjectMapping: 0.145800 ms MarkObjects: 6.149000 ms DeleteObjects: 4.880100 ms)
|
||||
|
||||
AssetImportParameters requested are different than current active one (requested -> active):
|
||||
custom:framework-win-MediaFoundation: 216162199b28c13a410421893ffa2e32 ->
|
||||
custom:video-decoder-ogg-theora: a1e56fd34408186e4bbccfd4996cb3dc ->
|
||||
custom:container-muxer-webm: aa71ff27fc2769a1b78a27578f13a17b ->
|
||||
custom:container-demuxer-webm: 4f35f7cbe854078d1ac9338744f61a02 ->
|
||||
custom:container-demuxer-ogg: 62fdf1f143b41e24485cea50d1cbac27 ->
|
||||
custom:video-encoder-webm-vp8: eb34c28f22e8b96e1ab97ce403110664 ->
|
||||
custom:video-decoder-webm-vp8: 9c59270c3fd7afecdb556c50c9e8de78 ->
|
||||
custom:audio-decoder-ogg-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||
custom:audio-encoder-webm-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||
========================================================================
|
||||
Received Import Request.
|
||||
Time since last request: 157.890594 seconds.
|
||||
path: Assets/Scenes/main_.unity
|
||||
artifactKey: Guid(2905cb1f57b5d7641adcaa938670a0cd) Importer(2089858483,934ff659095e30574adcf32a4c2f97b5)
|
||||
Start importing Assets/Scenes/main_.unity using Guid(2905cb1f57b5d7641adcaa938670a0cd) Importer(2089858483,934ff659095e30574adcf32a4c2f97b5) -> (artifact id: '015e7cf3ba425ba1e2f8534862ca953c') in 0.005788 seconds
|
||||
========================================================================
|
||||
Received Prepare
|
||||
Shader 'Custom/EVP Particles Alpha Blended Shadows': fallback shader 'Particles/Alpha Blended' not found
|
||||
Refreshing native plugins compatible for Editor in 7.77 ms, found 8 plugins.
|
||||
Preloading 0 native plugins for Editor in 0.00 ms.
|
||||
Unloading 97 Unused Serialized files (Serialized files now loaded: 0)
|
||||
System memory in use before: 158.5 MB.
|
||||
System memory in use after: 146.4 MB.
|
||||
|
||||
Unloading 97 unused Assets to reduce memory usage. Loaded Objects now: 5042.
|
||||
Total: 9.164600 ms (FindLiveObjects: 0.537100 ms CreateObjectMapping: 0.177500 ms MarkObjects: 3.511800 ms DeleteObjects: 4.936800 ms)
|
||||
|
||||
AssetImportParameters requested are different than current active one (requested -> active):
|
||||
custom:framework-win-MediaFoundation: 216162199b28c13a410421893ffa2e32 ->
|
||||
custom:video-decoder-ogg-theora: a1e56fd34408186e4bbccfd4996cb3dc ->
|
||||
custom:container-muxer-webm: aa71ff27fc2769a1b78a27578f13a17b ->
|
||||
custom:container-demuxer-webm: 4f35f7cbe854078d1ac9338744f61a02 ->
|
||||
custom:container-demuxer-ogg: 62fdf1f143b41e24485cea50d1cbac27 ->
|
||||
custom:video-encoder-webm-vp8: eb34c28f22e8b96e1ab97ce403110664 ->
|
||||
custom:video-decoder-webm-vp8: 9c59270c3fd7afecdb556c50c9e8de78 ->
|
||||
custom:audio-decoder-ogg-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||
custom:audio-encoder-webm-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||
========================================================================
|
||||
Received Import Request.
|
||||
Time since last request: 921.089563 seconds.
|
||||
path: Assets/Storm Effects/2 - Particles/Prefabs/Rain Heavy.prefab
|
||||
artifactKey: Guid(ab225d0c1ab04e549ab6401a65bcd6cd) Importer(2089858483,934ff659095e30574adcf32a4c2f97b5)
|
||||
Start importing Assets/Storm Effects/2 - Particles/Prefabs/Rain Heavy.prefab using Guid(ab225d0c1ab04e549ab6401a65bcd6cd) Importer(2089858483,934ff659095e30574adcf32a4c2f97b5) -> (artifact id: 'fb61bce41c986defe549c413087f1e7a') in 0.011829 seconds
|
||||
========================================================================
|
||||
Received Import Request.
|
||||
Time since last request: 0.000172 seconds.
|
||||
path: Assets/Scenes/main_.unity
|
||||
artifactKey: Guid(2905cb1f57b5d7641adcaa938670a0cd) Importer(2089858483,934ff659095e30574adcf32a4c2f97b5)
|
||||
Start importing Assets/Scenes/main_.unity using Guid(2905cb1f57b5d7641adcaa938670a0cd) Importer(2089858483,934ff659095e30574adcf32a4c2f97b5) -> (artifact id: 'fbb837335f28d39206e549da1e3ca50c') in 0.007824 seconds
|
||||
========================================================================
|
||||
Received Import Request.
|
||||
Time since last request: 26.564453 seconds.
|
||||
path: Assets/Scenes/main_.unity
|
||||
artifactKey: Guid(2905cb1f57b5d7641adcaa938670a0cd) Importer(2089858483,934ff659095e30574adcf32a4c2f97b5)
|
||||
Start importing Assets/Scenes/main_.unity using Guid(2905cb1f57b5d7641adcaa938670a0cd) Importer(2089858483,934ff659095e30574adcf32a4c2f97b5) -> (artifact id: '12ec401dad974a1ab50223ce4962bdfc') in 0.012315 seconds
|
||||
========================================================================
|
||||
Received Prepare
|
||||
Shader 'Custom/EVP Particles Alpha Blended Shadows': fallback shader 'Particles/Alpha Blended' not found
|
||||
Refreshing native plugins compatible for Editor in 8.09 ms, found 8 plugins.
|
||||
Preloading 0 native plugins for Editor in 0.00 ms.
|
||||
Unloading 97 Unused Serialized files (Serialized files now loaded: 0)
|
||||
System memory in use before: 158.5 MB.
|
||||
System memory in use after: 146.4 MB.
|
||||
|
||||
Unloading 97 unused Assets to reduce memory usage. Loaded Objects now: 5042.
|
||||
Total: 8.674300 ms (FindLiveObjects: 0.455900 ms CreateObjectMapping: 0.138800 ms MarkObjects: 2.963300 ms DeleteObjects: 5.114900 ms)
|
||||
|
||||
AssetImportParameters requested are different than current active one (requested -> active):
|
||||
custom:framework-win-MediaFoundation: 216162199b28c13a410421893ffa2e32 ->
|
||||
custom:video-decoder-ogg-theora: a1e56fd34408186e4bbccfd4996cb3dc ->
|
||||
custom:container-muxer-webm: aa71ff27fc2769a1b78a27578f13a17b ->
|
||||
custom:container-demuxer-webm: 4f35f7cbe854078d1ac9338744f61a02 ->
|
||||
custom:container-demuxer-ogg: 62fdf1f143b41e24485cea50d1cbac27 ->
|
||||
custom:video-encoder-webm-vp8: eb34c28f22e8b96e1ab97ce403110664 ->
|
||||
custom:video-decoder-webm-vp8: 9c59270c3fd7afecdb556c50c9e8de78 ->
|
||||
custom:audio-decoder-ogg-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||
custom:audio-encoder-webm-vorbis: bf7c407c2cedff20999df2af8eb42d56 ->
|
||||
========================================================================
|
||||
Received Prepare
|
||||
Registering precompiled user dll's ...
|
||||
Registered in 0.007302 seconds.
|
||||
Script error: OnTriggerEnter
|
||||
This message parameter has to be of type: Collider
|
||||
The message will be ignored.
|
||||
OnLevelWasLoaded was found on DOTweenComponent
|
||||
This message has been deprecated and will be removed in a later version of Unity.
|
||||
Add a delegate to SceneManager.sceneLoaded instead to get notifications after scene loading has completed
|
|
@ -1,3 +0,0 @@
|
|||
Base path: 'D:/2021.1.24f1/Editor/Data', plugins path 'D:/2021.1.24f1/Editor/Data/PlaybackEngines'
|
||||
Cmd: initializeCompiler
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue