我们做完相应的open模式,那么接下来就是关闭模式
![A~CVE5BU}D7WLXR]8ADY4ZB.png](http:https://img.haomeiwen.com/i642887/097bb82631dea276.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
我们这里需要执行关闭功能,但是我们需要一个判断,来决定关闭与否
![B%IML~Z6I9C]_)${@}H66MA.png](http:https://img.haomeiwen.com/i642887/b51b24888956326e.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
如果为了后续的拓展性,以及一些动画或者音乐开启等,我们需要再做拓展

接下来,就对他进行控制:
我们需要对方法进行保护,子类可以重写,但是外界不能访问

在我们管理器中提供相应的管理引用:即维护方法


如果要销毁界面,只需要直接修改这个bool 值
![T}CJSYY~XKLC]{2V{(1ZAQJ.png](http:https://img.haomeiwen.com/i642887/a310661297e33793.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)


在基类中制作延时销毁面板逻辑:

在UI管理器中:使用协成来进行相应的开发

调用方法让其检测:

或者在这里面搞:

最后不要忘记:移除所有的协程
![2]@4%KSP`NE]KJXF6IIW773.png](http:https://img.haomeiwen.com/i642887/53b5bad32d05277b.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)
网友评论