﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

//基本面板
public class CreatePanel : WindowBase
{
    private Button CloseButton;
    public override void OnInit()
    {
        base.OnInit();
        skinPath = "UIPrefab/CreatePanel";
        layer = UIManager.Layer.Panel;
    }

    //按钮点击事件传入触发的那个按钮使用lambda表达式
    public override void OnShow(params object[] para)
    {
        base.OnShow(para);
        CloseButton = skin.transform.Find("Button").GetComponent<Button>();
        CloseButton.onClick.AddListener(()=>{
            this.Close();
            print(CloseButton.name);
            });
    }

    public override void OnClose()
    {
        base.OnClose();
    }
}
