CultivationOfBrewing-2/Assets/Scripts/Project/UI/UI_Item/WorkingLineNameOrEquipmentD...

30 lines
735 B
C#

using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class WorkingLineNameOrEquipmentDualName : BaseItem
{
public Action<GameObject> callBack;
protected override void OnClick(string btnName)
{
switch (btnName)
{
case "RemoveBtn":
callBack?.Invoke(gameObject);
break;
default:
break;
}
}
private void OnEnable()
{
if (GameManager.RunModelMgr.ModeType == E_ModeType.Study)
GetControl<Button>("RemoveBtn").gameObject.SetActive(false);
else
GetControl<Button>("RemoveBtn").gameObject.SetActive(true);
}
}