26 lines
552 B
C#
26 lines
552 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class AmmeterSon : MonoBehaviour
|
|
{
|
|
public string name;
|
|
[SerializeField] AmmeterSon ammeterSon;
|
|
public bool Run = false;
|
|
private void Start()
|
|
{
|
|
}
|
|
private void OnMouseDown()
|
|
{
|
|
if (Run)
|
|
{
|
|
gameObject.SetActive(false);
|
|
if (ammeterSon != null)
|
|
{
|
|
ammeterSon.enabled = true;
|
|
ammeterSon.GetComponent<AmmeterSon>().Run = true;
|
|
}
|
|
}
|
|
}
|
|
}
|