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.
|
- using System;
- using Tweening;
- using UnityEngine;
-
- public class PopupBaseView : GUIView
- {
- public float TweenTime
- {
- get
- {
- return (!(this._tweener != null)) ? 0f : this._tweener.AnimationTime;
- }
- }
-
- public virtual void OnBlackOverlayClicked()
- {
- this.OnCloseClicked();
- }
-
- public virtual void OnCloseClicked()
- {
- this.PopupState.ClosePopup();
- }
-
- public virtual void OnBackClicked()
- {
- this.PopupState.ClosePopup();
- }
-
- public void AnimateIn()
- {
- if (this._tweener != null)
- {
- if (this._tweener.IsPlaying)
- {
- this._tweener.StopAndReset(this._tweener.IsPlaybackReversed);
- }
- this._tweener.Play();
- }
- }
-
- public void SkipAnimation()
- {
- this._tweener.Reset(true);
- }
-
- public void AnimateOut()
- {
- if (this._tweener != null)
- {
- if (this._tweener.IsPlaying)
- {
- this._tweener.StopAndReset(this._tweener.IsPlaybackReversed);
- }
- this._tweener.PlayReverse();
- }
- }
-
- protected PopupBaseState PopupState
- {
- get
- {
- return this.State as PopupBaseState;
- }
- }
-
- [SerializeField]
- private Tweener _tweener;
- }
|