45 lines
1.6 KiB
C#
45 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 float activation;
|
|
public string name;
|
|
public bool isBlack;
|
|
public string VV;
|
|
|
|
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,0,-2), 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,0, -2f), 0.25f);
|
|
GameManager.ins.RedWanYon.layer = 0;
|
|
GameManager.ins.MultimeterIm.gameObject.SetActive(true);
|
|
if (electricity)
|
|
{
|
|
GameManager.ins.DianFuIm.gameObject.SetActive(true);
|
|
GameManager.ins.DianFuTex.text = activation + VV;
|
|
}
|
|
}
|
|
Debug.Log("³É¹¦");
|
|
}
|
|
}
|