38 lines
857 B
C#
38 lines
857 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class DeviceBtnItem : MonoBehaviour
|
|
{
|
|
public Button selfBtn;
|
|
public string id;
|
|
public string selfName;
|
|
public Text selfText;
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
selfBtn = GetComponent<Button>();
|
|
selfText = transform.GetComponentInChildren<Text>();
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
|
|
public void SetInfo(string _id, string _selfName)
|
|
{
|
|
id = _id;
|
|
selfName = _selfName;
|
|
selfText.text = _selfName;
|
|
if (_selfName == "自杀式无人机" || _selfName.Contains("地面无线电干扰") || _selfName.Contains("微波武器"))
|
|
{
|
|
selfBtn.interactable = false;
|
|
}
|
|
}
|
|
|
|
}
|