ict.xunfei/Assets/Scripts/UI/MainScenesUI/stepPanel/StepThreePanel.cs

39 lines
816 B
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using System;
using DG.Tweening;
public class StepThreePanel : UIController
{
[SerializeField] Image im;
[SerializeField] Image BG;
[SerializeField] Button btn;
public bool isok = false;
private void Start()
{
btn.onClick.AddListener(() =>
{
hide(ref isok);
});
}
void hide(ref bool ok)
{
ok = true;
}
public override void hide(Image mainBody, Image BG, Action ac = null)
{
mainBody.transform.DOScale(new Vector3(0, 0, 0), 0.01f);
BG.gameObject.SetActive(false);
}
private void OnEnable()
{
base.show(im, BG);
}
private void OnDisable()
{
this.hide(im, BG);
}
}