using System;
using System.Collections;
using UnityEngine;
using UnityEngine.UI;
namespace TapTap.UI
{
///
/// base panel of TapSDK UI module
///
[RequireComponent(typeof(Canvas))]
[RequireComponent(typeof(CanvasGroup))]
public abstract class BasePanelController : MonoBehaviour
{
///
/// the canvas related to this panel
///
[HideInInspector]
public Canvas canvas;
///
/// the canvas group related to this panel
///
[HideInInspector]
public CanvasGroup canvasGroup;
///
/// fade in/out time
///
private const float FADE_TIME = 0.15f;
///
/// animation elapse time
///
private float _animationElapse;
private Vector2 _screenSize;
private Vector2 _cachedAnchorPos;
private RectTransform _rectTransform;
private Coroutine _animationCoroutine;
///
/// open parameter
///
protected internal AbstractOpenPanelParameter openParam;
///
/// settings about this panel
///
public BasePanelConfig panelConfig;
///
/// 特殊面板需要一直保持置顶的,需要填写 toppedOrder, toppedOrder 越大越置顶
///
public int toppedOrder;
///
/// the transform parent when created it would be attached to
///
///
public virtual Transform AttachedParent => UIManager.Instance.GetUIRootTransform(this);
#region Load
protected virtual void Awake()
{
canvas = GetComponent