43 lines
1008 B
C#
43 lines
1008 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
/// <summary>
|
|
/// UI交付的时候左右脚本反了
|
|
/// </summary>
|
|
public class UI_FailureOptionsLeft : MonoBehaviour
|
|
{
|
|
public UI_FaultSelectionRegistrationPanel mainPanel;
|
|
|
|
public void DeleteSelected()
|
|
{
|
|
UI_FaultSituationL2Btn[] faultTogs = GameObject.FindObjectsOfType<UI_FaultSituationL2Btn>();
|
|
foreach (var item in faultTogs)
|
|
{
|
|
if (this.gameObject.name.Equals(item.gameObject.name))
|
|
{
|
|
Toggle tog = item.GetComponent<Toggle>();
|
|
tog.isOn = false;
|
|
break;
|
|
}
|
|
}
|
|
if (gameObject != null)
|
|
GameObject.DestroyImmediate(gameObject);
|
|
mainPanel.ResetL2FaultLimitationBySelected();
|
|
|
|
}
|
|
|
|
// Start is called before the first frame update
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
|
|
}
|
|
}
|