You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
577 B
27 lines
577 B
using UnityEngine;
|
|
|
|
public enum ViewState
|
|
{
|
|
Showing,
|
|
Shown,
|
|
Hiding,
|
|
Hidden
|
|
}
|
|
|
|
public abstract class View : MonoBehaviour
|
|
{
|
|
public ViewState viewState { get; protected set; }
|
|
public RectTransform rectTransform => transform as RectTransform;
|
|
|
|
public virtual void ResetPosition()
|
|
{
|
|
rectTransform.anchorMin = Vector2.zero;
|
|
rectTransform.anchorMax = Vector2.one;
|
|
|
|
rectTransform.offsetMin = Vector2.zero;
|
|
rectTransform.offsetMax = Vector2.zero;
|
|
}
|
|
|
|
public abstract void Show();
|
|
public abstract void Hide();
|
|
}
|