完成万用表

This commit is contained in:
康地林 2023-09-16 16:20:56 +08:00
parent eb7bebd470
commit 4bba746adf
15 changed files with 488 additions and 3883 deletions

View File

@ -1,110 +0,0 @@
fileFormatVersion: 2
guid: f8ba2921d2c970b4ca78af007284e752
timeCreated: 1511375318
licenseType: Store
PluginImporter:
externalObjects: {}
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
- first:
'': Any
second:
enabled: 0
settings:
Exclude Android: 1
Exclude Editor: 0
Exclude Linux: 0
Exclude Linux64: 0
Exclude LinuxUniversal: 0
Exclude OSXIntel: 0
Exclude OSXIntel64: 0
Exclude OSXUniversal: 0
Exclude WebGL: 1
Exclude Win: 0
Exclude Win64: 1
- first:
Android: Android
second:
enabled: 0
settings:
CPU: x86
- first:
Any:
second:
enabled: 0
settings: {}
- first:
Editor: Editor
second:
enabled: 1
settings:
CPU: x86
DefaultValueInitialized: true
OS: Windows
- first:
Facebook: Win
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Facebook: Win64
second:
enabled: 0
settings:
CPU: None
- first:
Standalone: Linux
second:
enabled: 1
settings:
CPU: x86
- first:
Standalone: Linux64
second:
enabled: 1
settings:
CPU: x86_64
- first:
Standalone: LinuxUniversal
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXIntel
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXIntel64
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: OSXUniversal
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: Win
second:
enabled: 1
settings:
CPU: AnyCPU
- first:
Standalone: Win64
second:
enabled: 0
settings:
CPU: None
userData:
assetBundleName:
assetBundleVariant:

View File

@ -416,7 +416,7 @@ PrefabInstance:
m_SourcePrefab: {fileID: 100100000, guid: d4ce1f39cf944094ca8861f1b0fc1f20, type: 3}
--- !u!4 &87013821 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 9172046023098530846, guid: d4ce1f39cf944094ca8861f1b0fc1f20, type: 3}
m_CorrespondingSourceObject: {fileID: 2131893628021589511, guid: d4ce1f39cf944094ca8861f1b0fc1f20, type: 3}
m_PrefabInstance: {fileID: 87013820}
m_PrefabAsset: {fileID: 0}
--- !u!1 &94654049 stripped
@ -4462,7 +4462,7 @@ PrefabInstance:
m_SourcePrefab: {fileID: 100100000, guid: d4ce1f39cf944094ca8861f1b0fc1f20, type: 3}
--- !u!4 &736353504 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 9172046023098530846, guid: d4ce1f39cf944094ca8861f1b0fc1f20, type: 3}
m_CorrespondingSourceObject: {fileID: 2131893628021589511, guid: d4ce1f39cf944094ca8861f1b0fc1f20, type: 3}
m_PrefabInstance: {fileID: 736353503}
m_PrefabAsset: {fileID: 0}
--- !u!1 &737629626
@ -4967,31 +4967,31 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 3350233854110697392, guid: 5a7d7e9bd76f93b418b1f916781feb6a, type: 3}
propertyPath: m_LocalPosition.x
value: -5.731
value: -6.015
objectReference: {fileID: 0}
- target: {fileID: 3350233854110697392, guid: 5a7d7e9bd76f93b418b1f916781feb6a, type: 3}
propertyPath: m_LocalPosition.y
value: -0.635
value: -0.632
objectReference: {fileID: 0}
- target: {fileID: 3350233854110697392, guid: 5a7d7e9bd76f93b418b1f916781feb6a, type: 3}
propertyPath: m_LocalPosition.z
value: 4.747
value: 6.3
objectReference: {fileID: 0}
- target: {fileID: 3350233854110697392, guid: 5a7d7e9bd76f93b418b1f916781feb6a, type: 3}
propertyPath: m_LocalRotation.w
value: 0.535383
value: 0.012301178
objectReference: {fileID: 0}
- target: {fileID: 3350233854110697392, guid: 5a7d7e9bd76f93b418b1f916781feb6a, type: 3}
propertyPath: m_LocalRotation.x
value: -0
value: 0.000064534375
objectReference: {fileID: 0}
- target: {fileID: 3350233854110697392, guid: 5a7d7e9bd76f93b418b1f916781feb6a, type: 3}
propertyPath: m_LocalRotation.y
value: 0.8446094
value: 0.9999128
objectReference: {fileID: 0}
- target: {fileID: 3350233854110697392, guid: 5a7d7e9bd76f93b418b1f916781feb6a, type: 3}
propertyPath: m_LocalRotation.z
value: -0
value: -0.004810292
objectReference: {fileID: 0}
- target: {fileID: 3350233854110697392, guid: 5a7d7e9bd76f93b418b1f916781feb6a, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
@ -5005,6 +5005,10 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3350233854110697398, guid: 5a7d7e9bd76f93b418b1f916781feb6a, type: 3}
propertyPath: enableZoom
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3350233854110697404, guid: 5a7d7e9bd76f93b418b1f916781feb6a, type: 3}
propertyPath: m_Name
value: Player
@ -5546,16 +5550,16 @@ Transform:
- {fileID: 566277947}
- {fileID: 2485696926832843571}
- {fileID: 1543101288}
- {fileID: 8538951922200433079}
- {fileID: 87013821}
- {fileID: 736353504}
- {fileID: 1321881611}
- {fileID: 87013821}
- {fileID: 978167238131247011}
- {fileID: 582647860}
- {fileID: 1593041147}
- {fileID: 1606462042}
- {fileID: 397849776}
- {fileID: 1805457883}
- {fileID: 705328785049202090}
- {fileID: 1104749037}
- {fileID: 1772425158}
- {fileID: 543450653591772314}
@ -5749,7 +5753,7 @@ Transform:
m_Children:
- {fileID: 2059769794}
m_Father: {fileID: 0}
m_RootOrder: 8
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1265359521
MonoBehaviour:
@ -6189,7 +6193,7 @@ PrefabInstance:
m_SourcePrefab: {fileID: 100100000, guid: d4ce1f39cf944094ca8861f1b0fc1f20, type: 3}
--- !u!4 &1321881611 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 9172046023098530846, guid: d4ce1f39cf944094ca8861f1b0fc1f20, type: 3}
m_CorrespondingSourceObject: {fileID: 2131893628021589511, guid: d4ce1f39cf944094ca8861f1b0fc1f20, type: 3}
m_PrefabInstance: {fileID: 1321881610}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &1335136005
@ -8597,6 +8601,11 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: d4ce1f39cf944094ca8861f1b0fc1f20, type: 3}
--- !u!4 &705328785049202090 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2131893628021589511, guid: d4ce1f39cf944094ca8861f1b0fc1f20, type: 3}
m_PrefabInstance: {fileID: 705328785049202089}
m_PrefabAsset: {fileID: 0}
--- !u!4 &978167238131247011 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 8567120291302249890, guid: b3831f69955b0974288d5a6149b06332, type: 3}
@ -9316,7 +9325,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 962704353483637904, guid: eba75dd16d820074fbba9f43892bc9a8, type: 3}
propertyPath: m_RootOrder
value: 9
value: 8
objectReference: {fileID: 0}
- target: {fileID: 962704353483637904, guid: eba75dd16d820074fbba9f43892bc9a8, type: 3}
propertyPath: m_LocalPosition.x
@ -9521,11 +9530,6 @@ Transform:
m_CorrespondingSourceObject: {fileID: 8218745123122009150, guid: 4b06ca5b0865ade40b27cf11a123ba5c, type: 3}
m_PrefabInstance: {fileID: 229129740073070433}
m_PrefabAsset: {fileID: 0}
--- !u!4 &8538951922200433079 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 9172046023098530846, guid: d4ce1f39cf944094ca8861f1b0fc1f20, type: 3}
m_PrefabInstance: {fileID: 705328785049202089}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &8896759256110363137
PrefabInstance:
m_ObjectHideFlags: 0

View File

@ -5,17 +5,19 @@ using UnityEngine;
public class Multimeter : MonoBehaviour
{
[Header("是否带电")]
public bool electricity = false;
public bool activation = false;
[Header("电流")]
public int activation;
private void OnMouseDown()
{
//Debug.Log("ok");
if (GameManager.ins.BlackWanYon!=null)
{
GameManager.ins.BlackWanYon.transform.parent = transform;
GameManager.ins.BlackWanYon.transform.DOLocalRotate(new Vector3(56, 0, 0), 0.25f);
GameManager.ins.BlackWanYon.transform.DOScale(new Vector3(200,200,200), 0.25f);
GameManager.ins.BlackWanYon.transform.DOLocalMove(new Vector3(0,0,-2), 0.25f);
GameManager.ins.BlackWanYon.layer = 0;
}
if (GameManager.ins.RedWanYon != null)
{
@ -23,6 +25,7 @@ public class Multimeter : MonoBehaviour
GameManager.ins.RedWanYon.transform.DOLocalRotate(new Vector3(56, 0, 0), 0.25f);
GameManager.ins.RedWanYon.transform.DOScale(new Vector3(200,200,200), 0.25f);
GameManager.ins.RedWanYon.transform.DOLocalMove(new Vector3(0,0, -2f), 0.25f);
GameManager.ins.RedWanYon.layer = 0;
}
Debug.Log("³É¹¦");
}

View File

@ -8,6 +8,7 @@ public class MultimeterManager : MonoBehaviour
[SerializeField] Transform blackXian;
[SerializeField] Transform RedXian;
private Multimeter multimeter;
[SerializeField] Camera Camera;
// Start is called before the first frame update
void Start()
{
@ -21,7 +22,7 @@ public class MultimeterManager : MonoBehaviour
if (Input.GetMouseButtonDown(0))
{
// 从相机位置发射一条射线经过屏幕上的鼠标点击位置
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
Ray ray = Camera.ScreenPointToRay(Input.mousePosition);
// 声明一个射线碰撞信息类
RaycastHit hit;
@ -31,11 +32,9 @@ public class MultimeterManager : MonoBehaviour
if (res)
{
Debug.Log("װ");
// 如果产生了碰撞
if (hit.collider.name.Equals("RedWanYon"))
{
Debug.Log("װ2");
GameManager.ins.BlackWanYon = null;
GameManager.ins.RedWanYon = RedXian.gameObject;
}

View File

@ -23,9 +23,11 @@ public class MultimeterRecovery : MonoBehaviour
BlackTrans.transform.DOLocalRotate(new Vector3(0, 0, 0), 0.25f);
BlackTrans.transform.DOScale(new Vector3(1,1,1), 0.25f);
BlackTrans.transform.DOLocalMove(Blackpos, 0.25f);
BlackTrans.gameObject.layer = 7;
RedTrans.transform.DOLocalRotate(new Vector3(0, 0, 0), 0.25f);
RedTrans.transform.DOScale(new Vector3(1,1,1), 0.25f);
RedTrans.transform.DOLocalMove(Redpos, 0.25f);
RedTrans.gameObject.layer = 7;
});
}
}

View File

@ -52,6 +52,7 @@ public class GameManager : MonoBehaviour
//{
// //Inverter[i].gameObject.SetActive(true);
//}
//System.Diagnostics.Process.Start(Application.streamingAssetsPath+ "/ycxt2.0/index.html");
UIManager.Instance.ToolsItemManager.ItemClick.AddListener(ToolsShow);
}
async Task initAsync()
@ -67,18 +68,6 @@ public class GameManager : MonoBehaviour
}
private void Update()
{
if (Input.GetKeyDown(KeyCode.Q))
{
ToolsShow(QianXing);
}
//if(Input.GetKeyDown(KeyCode.W))
//{
// ToolsShow(WanYon);
//}
if (Input.GetKeyDown(KeyCode.E))
{
ToolsShow(YanDianBi);
}
switch (interactiveEnum)
{
case Interactive.none:
@ -113,7 +102,6 @@ public class GameManager : MonoBehaviour
Destroy(temp.gameObject);
}
temp = Instantiate(tools, Player.transform);
UIManager.Instance.ToolsItemManager.currentTool = temp;
string name = Filter(temp.name, TempChar);

View File

@ -171,7 +171,7 @@ PlayerSettings:
Standalone: 0
iPhone: 0
tvOS: 0
overrideDefaultApplicationIdentifier: 0
overrideDefaultApplicationIdentifier: 1
AndroidBundleVersionCode: 1
AndroidMinSdkVersion: 22
AndroidTargetSdkVersion: 0