E_ElecCompetition/Electrical_inspectionCompet.../Assets/Script/Interactive objects/CurrentJudgment.cs

36 lines
876 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;
public class CurrentJudgment : MonoBehaviour
{
/// <summary>
/// 验电笔
/// </summary>
public CheckCurrent testPen;
/// <summary>
/// 验电笔媳妇位置和角度
/// </summary>
public Vector3 penPos,penRot;
public bool ;
// Start is called before the first frame update
void Start()
{
}
private void OnMouseDown()
{
if (testPen.gameObject.activeInHierarchy)
{
if (testPen.isOperation)
return;
testPen.transform.SetParent(this.transform);
testPen.transform.DOLocalMove(penPos, 1.5f).OnComplete(()=> {
testPen.Inspection();
});
testPen.transform.DOLocalRotate(penRot, 1.5f);
}
}
}