123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- using UnityEngine;
- using UnityEngine.UI;
- using System.Collections;
- public abstract class PopUpPanel : MonoBehaviour
- {
- private bool _modal;
- public Image backGround;
- public bool PlayAnimationStart = true;
- public bool PlayAnimationEnd = true;
- public bool NoEspScale = false;
- public enum Type : int
- {
- NONE = -1,
- SCALE_UP = 0,
- SCALE_DOWN = 1,
- ROTATION_Y = 2,
- ROSITION_X_UP = 3,
- ROSITION_X_DOWN = 4,
- ROSITION_Y_UP = 5,
- ROSITION_Y_DOWN = 6,
- }
- public void InitBackGround(Transform BG)
- {
- backGround = BG.GetComponent<Image>();
- }
- public Type type = Type.NONE;
- public bool modal
- {
- set{_modal = value;}
- get{return _modal;}
- }
- public virtual void Added()
- {
- }
- public virtual void Remove()
- {
- Destroy(this.gameObject);
- PopUpManager.UpdateModal();
- }
- /// <summary>
- /// ±ØÐëµ÷Óà OnClose·½·¨
- /// </summary>
- public abstract void Close();
- public void OnClose()
- {
- PopUpUtil popUpUtil = this.GetComponent<PopUpUtil>();
- if (popUpUtil != null)
- {
- popUpUtil.Close();
- }
- else
- {
- Destroy(this.gameObject);
- }
- }
-
- }
|