Merge branch 'master' of https://git.lgzn.space/zhuyayu/E_ElecCompetition
This commit is contained in:
commit
d90489fd56
|
@ -10576,6 +10576,10 @@ PrefabInstance:
|
|||
propertyPath: m_Name
|
||||
value: "\u4F0F\u5B89UI"
|
||||
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}
|
||||
propertyPath: m_Pivot.x
|
||||
value: 0.5
|
||||
|
@ -140631,6 +140635,10 @@ PrefabInstance:
|
|||
propertyPath: m_TagString
|
||||
value: Untagged
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1253040782233410607, guid: 3fb1235fb3cb2ea4782e6c99e4cff4bf, type: 3}
|
||||
propertyPath: isDian
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4300732867488139875, guid: 3fb1235fb3cb2ea4782e6c99e4cff4bf, type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 24
|
||||
|
|
|
@ -19,32 +19,35 @@ public class MultimeterManager : MonoBehaviour
|
|||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
// 鼠标左键按下
|
||||
if (Input.GetMouseButtonDown(0))
|
||||
if (Camera)
|
||||
{
|
||||
// 从相机位置发射一条射线经过屏幕上的鼠标点击位置
|
||||
Ray ray = Camera.ScreenPointToRay(Input.mousePosition);
|
||||
|
||||
// 声明一个射线碰撞信息类
|
||||
RaycastHit hit;
|
||||
|
||||
// 进行碰撞检测
|
||||
bool res = Physics.Raycast(ray, out hit,1 << 7) && !EventSystem.current.IsPointerOverGameObject();
|
||||
|
||||
if (res)
|
||||
// 鼠标左键按下
|
||||
if (Input.GetMouseButtonDown(0))
|
||||
{
|
||||
// 如果产生了碰撞
|
||||
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