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.1f;
///
/// animation elapse time
///
private float _animationElapse;
private Vector2 _screenSize;
private Vector2 _cachedAnchorPos;
private RectTransform _rectTransform;
private Coroutine _animationCoroutine;
///
/// open parameter
///
protected IOpenPanelParameter openParam;
///
/// sorting order of this panel
///
public int openOrder;
///
/// settings about this panel
///
public BasePanelConfig panelConfig;
///
/// the transform parent when created it would be attached to
///
///
public virtual Transform AttachedParent => UIManager.Instance.GetUIRootTransform();
#region Load
protected virtual void Awake()
{
canvas = GetComponent