钳形电流表

This commit is contained in:
王军 2023-09-16 00:27:36 +08:00
commit 272dc3f8f4
11 changed files with 135088 additions and 1257 deletions

View File

@ -1,10 +1,18 @@
{
"name": "ZFBrowser-Editor",
"rootNamespace": "",
"references": [
"ZFBrowser"
],
"includePlatforms": [
"Editor"
],
"excludePlatforms": []
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@ -1,12 +1,30 @@
{
"name": "ZFBrowser",
"rootNamespace": "",
"references": [],
"includePlatforms": [
"Editor",
"LinuxStandalone64",
"macOSStandalone",
"WindowsStandalone32",
"WindowsStandalone64"
"includePlatforms": [],
"excludePlatforms": [
"Android",
"EmbeddedLinux",
"GameCoreScarlett",
"GameCoreXboxOne",
"iOS",
"CloudRendering",
"Lumin",
"PS4",
"PS5",
"Stadia",
"Switch",
"tvOS",
"WSA",
"WebGL",
"XboxOne"
],
"excludePlatforms": []
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"autoReferenced": true,
"defineConstraints": [],
"versionDefines": [],
"noEngineReferences": false
}

View File

@ -5993,6 +5993,63 @@ PrefabInstance:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 01e6597f86f54b54bb4177d19926017f, type: 3}
--- !u!1 &3572207741997868335 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: 01e6597f86f54b54bb4177d19926017f, type: 3}
m_PrefabInstance: {fileID: 4418701739807725694}
m_PrefabAsset: {fileID: 0}
--- !u!95 &451662875
Animator:
serializedVersion: 4
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3572207741997868335}
m_Enabled: 1
m_Avatar: {fileID: 0}
m_Controller: {fileID: 9100000, guid: 1118d2edb334963448c62cb7d5c3b67d, type: 2}
m_CullingMode: 0
m_UpdateMode: 0
m_ApplyRootMotion: 0
m_LinearVelocityBlending: 0
m_StabilizeFeet: 0
m_WarningMessage:
m_HasTransformHierarchy: 1
m_AllowConstantClipSamplingOptimization: 1
m_KeepAnimatorControllerStateOnDisable: 0
--- !u!114 &451662874
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3572207741997868335}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 79f17ac2192e9a74f84269fd2ddb5b32, type: 3}
m_Name:
m_EditorClassIdentifier:
mouseButton: 0
"\u542F\u7528\u4EA4\u4E92": 1
"\u662F\u5426\u5F00\u95E8": 0
"\u9A8C\u7535\u7B14": {fileID: 0}
"\u5F00\u95E8\u52A8\u753B": "\u5F00\u95E8"
"\u5173\u95E8\u52A8\u753B": "\u5173\u95E8"
animator: {fileID: 0}
--- !u!65 &451662876
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3572207741997868335}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 0.014381938, y: 0.7307947, z: 0.95005393}
m_Center: {x: 0.029461166, y: -0.3566327, z: 0.0007125139}
--- !u!4 &4240377296627613589 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 01e6597f86f54b54bb4177d19926017f, type: 3}

View File

@ -797,8 +797,13 @@ Transform:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5363856005780046791}
<<<<<<< HEAD
m_LocalRotation: {x: 0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0, y: 0, z: 0.25}
=======
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -6.53, y: 0, z: -12.88}
>>>>>>> f34d66c0c477ff33bfc73b5d5aab2820ef7b0671
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
@ -1010,8 +1015,8 @@ Transform:
m_GameObject: {fileID: 6158171241742345501}
m_LocalRotation: {x: 0, y: 0.7071068, z: 0, w: 0.7071068}
m_LocalPosition: {x: -2.9079998, y: -0.558, z: 2.842}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_LocalScale: {x: 0.02999999, y: 0.029999994, z: 0.029999992}
m_ConstrainProportionsScale: 1
m_Children:
- {fileID: 5141020518187440115}
m_Father: {fileID: 0}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 489cf436fe24a34498dc236c01013d99
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,25 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AmmeterSon : MonoBehaviour
{
public string name;
[SerializeField] AmmeterSon ammeterSon;
bool Run = false;
private void Start()
{
Run = true;
}
private void OnMouseDown()
{
if (Run)
{
gameObject.SetActive(false);
if (ammeterSon != null)
{
ammeterSon.enabled = true;
}
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 1b7105d1f10415c419458fa7df96cb55
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -23,7 +23,8 @@ public class GameManager : MonoBehaviour
[SerializeField] SceneData SceneData;//暂时数据
[SerializeField] List<GameObject> Inverter;
[SerializeField] Transform trans;
[SerializeField] StopValve StopValve;
[SerializeField] StopValve WanStopValve;
[SerializeField] StopValve QianStopValve;
public GameObject temp;
[SerializeField] List<GameObject> interactive;
public Interactive interactiveEnum = Interactive.none;
@ -118,12 +119,17 @@ public class GameManager : MonoBehaviour
switch (name)
{
case "万用表":
StopValve.trans = temp.transform;
WanStopValve.gameObject.SetActive(true);
QianStopValve.gameObject.SetActive(false);
WanStopValve.trans = temp.transform;
break;
case "钳形电流表":
interactiveEnum = Interactive.QianXing;
temp.transform.localRotation = Quaternion.Euler(new Vector3(90, 180, 0));
temp.transform.localPosition = new Vector3(0.312f, 0.316f, 0.618f);
QianStopValve.trans = temp.transform;
WanStopValve.gameObject.SetActive(false);
QianStopValve.gameObject.SetActive(true);
break;
case "验电笔":
interactiveEnum = Interactive.YanDian;

View File

@ -15,8 +15,9 @@ public class StopValve : MonoBehaviour, IBeginDragHandler, IEndDragHandler, IDra
public Transform trans;
[SerializeField] int mix;
[SerializeField] int max;
[SerializeField] float X;
int sum = 90;
[SerializeField] float X;//X或者特定轴要固定的
[SerializeField] int sum = 90;//初始位置
[SerializeField] int ZhuanSum;//要旋转一次的角度
void OnEnable()
{
//UIManager.ins.ButtonToUI_but(true, confirm, popup);
@ -44,11 +45,11 @@ public class StopValve : MonoBehaviour, IBeginDragHandler, IEndDragHandler, IDra
{
if (currentPos.x - eventData.position.x > 0)
{
sum += 10;
sum += ZhuanSum;
}
if (currentPos.x - eventData.position.x < 0)
{
sum += -10;
sum += -ZhuanSum;
}
Debug.Log("旋转的方法");
Deng(sum);
@ -59,8 +60,15 @@ public class StopValve : MonoBehaviour, IBeginDragHandler, IEndDragHandler, IDra
{
float z = Mathf.Clamp(angle, mix, max);
stopValveImage.transform.eulerAngles = new Vector3(0, 0, z);
trans.DOLocalRotate(new Vector3(X, 0,~(int)z),0.01f);
if (transform.name.Equals("万用表"))
{
trans.DOLocalRotate(new Vector3(X, 0, ~(int)z), 0.01f);
}
else
{
trans.DOLocalRotate(new Vector3(X, ~(int)z, 0), 0.01f);
}
Debug.Log(Mathf.Clamp(~(int)z, mix, max));
}