43 lines
1.6 KiB
C#
43 lines
1.6 KiB
C#
using DG.Tweening;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class Multimeter : MonoBehaviour
|
|
{
|
|
[Header("是否带电")]
|
|
public bool electricity = false;
|
|
[Header("电流")]
|
|
public string activation;
|
|
public string name;
|
|
public bool isBlack;
|
|
public string VV;
|
|
public bool isok = false;
|
|
|
|
private void OnMouseDown()
|
|
{
|
|
if (GameManager.ins.BlackWanYon!=null&& isBlack)
|
|
{
|
|
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.14f, -0.08f, 0.11f), 0.25f);
|
|
GameManager.ins.BlackWanYon.layer = 0;
|
|
GameManager.ins.MultimeterIm.gameObject.SetActive(true);
|
|
|
|
}
|
|
if (GameManager.ins.RedWanYon != null&&!isBlack)
|
|
{
|
|
GameManager.ins.RedWanYon.transform.parent = transform;
|
|
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.08f,0.08f,0.11f), 0.25f);
|
|
GameManager.ins.RedWanYon.layer = 0;
|
|
GameManager.ins.MultimeterIm.gameObject.SetActive(true);
|
|
GameManager.ins.show(activation + VV);
|
|
Debug.Log(activation + VV + "安康就是看到机会");
|
|
}
|
|
Debug.Log("成功");
|
|
}
|
|
}
|