提交验电笔
This commit is contained in:
parent
621d6fb702
commit
d123ad5a46
|
@ -10576,6 +10576,10 @@ PrefabInstance:
|
||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: "\u4F0F\u5B89UI"
|
value: "\u4F0F\u5B89UI"
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5953364403843559748, guid: 6858abc4395af9947bb1e19b0f27fffb, type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5953364403843559751, guid: 6858abc4395af9947bb1e19b0f27fffb, type: 3}
|
- target: {fileID: 5953364403843559751, guid: 6858abc4395af9947bb1e19b0f27fffb, type: 3}
|
||||||
propertyPath: m_Pivot.x
|
propertyPath: m_Pivot.x
|
||||||
value: 0.5
|
value: 0.5
|
||||||
|
@ -140631,6 +140635,10 @@ PrefabInstance:
|
||||||
propertyPath: m_TagString
|
propertyPath: m_TagString
|
||||||
value: Untagged
|
value: Untagged
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 1253040782233410607, guid: 3fb1235fb3cb2ea4782e6c99e4cff4bf, type: 3}
|
||||||
|
propertyPath: isDian
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4300732867488139875, guid: 3fb1235fb3cb2ea4782e6c99e4cff4bf, type: 3}
|
- target: {fileID: 4300732867488139875, guid: 3fb1235fb3cb2ea4782e6c99e4cff4bf, type: 3}
|
||||||
propertyPath: m_RootOrder
|
propertyPath: m_RootOrder
|
||||||
value: 24
|
value: 24
|
||||||
|
|
|
@ -19,32 +19,35 @@ public class MultimeterManager : MonoBehaviour
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
void Update()
|
void Update()
|
||||||
{
|
{
|
||||||
// 鼠标左键按下
|
if (Camera)
|
||||||
if (Input.GetMouseButtonDown(0))
|
|
||||||
{
|
{
|
||||||
// 从相机位置发射一条射线经过屏幕上的鼠标点击位置
|
// 鼠标左键按下
|
||||||
Ray ray = Camera.ScreenPointToRay(Input.mousePosition);
|
if (Input.GetMouseButtonDown(0))
|
||||||
|
|
||||||
// 声明一个射线碰撞信息类
|
|
||||||
RaycastHit hit;
|
|
||||||
|
|
||||||
// 进行碰撞检测
|
|
||||||
bool res = Physics.Raycast(ray, out hit,1 << 7) && !EventSystem.current.IsPointerOverGameObject();
|
|
||||||
|
|
||||||
if (res)
|
|
||||||
{
|
{
|
||||||
// 如果产生了碰撞
|
// 从相机位置发射一条射线经过屏幕上的鼠标点击位置
|
||||||
if (hit.collider.name.Equals("RedWanYon"))
|
Ray ray = Camera.ScreenPointToRay(Input.mousePosition);
|
||||||
|
|
||||||
|
// 声明一个射线碰撞信息类
|
||||||
|
RaycastHit hit;
|
||||||
|
|
||||||
|
// 进行碰撞检测
|
||||||
|
bool res = Physics.Raycast(ray, out hit, 1 << 7) && !EventSystem.current.IsPointerOverGameObject();
|
||||||
|
|
||||||
|
if (res)
|
||||||
{
|
{
|
||||||
GameManager.ins.BlackWanYon = null;
|
// 如果产生了碰撞
|
||||||
GameManager.ins.RedWanYon = RedXian.gameObject;
|
if (hit.collider.name.Equals("RedWanYon"))
|
||||||
|
{
|
||||||
|
GameManager.ins.BlackWanYon = null;
|
||||||
|
GameManager.ins.RedWanYon = RedXian.gameObject;
|
||||||
|
}
|
||||||
|
if (hit.collider.name.Equals("BlackWanYon"))
|
||||||
|
{
|
||||||
|
GameManager.ins.RedWanYon = null;
|
||||||
|
GameManager.ins.BlackWanYon = blackXian.gameObject;
|
||||||
|
}
|
||||||
|
Debug.Log(hit.collider.name);
|
||||||
}
|
}
|
||||||
if (hit.collider.name.Equals("BlackWanYon"))
|
|
||||||
{
|
|
||||||
GameManager.ins.RedWanYon = null;
|
|
||||||
GameManager.ins.BlackWanYon = blackXian.gameObject;
|
|
||||||
}
|
|
||||||
Debug.Log(hit.collider.name);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class VoltAmpereMeter : MonoBehaviour
|
||||||
|
{
|
||||||
|
// Start is called before the first frame update
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,11 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 009306981be6fdd42bcf5d7f9474d54a
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
Reference in New Issue