| | |
| | |
|
| | | public class LaunchBackGroundWin : Window
|
| | | {
|
| | | [SerializeField] RectTransform m_StaticBackGround;
|
| | | [SerializeField] Image m_BackGroundImage;
|
| | | [SerializeField] RectTransform m_DynamicBackGround;
|
| | | [SerializeField] SkeletonGraphic m_SkeletonGraphic;
|
| | |
|
| | | GameObject loginEffect;
|
| | |
|
| | | bool useStaticBackGround = false;
|
| | | #region Built-in
|
| | | protected override void BindController()
|
| | | {
|
| | |
| | |
|
| | | protected override void OnPreOpen()
|
| | | {
|
| | | var sprite = Resources.Load<Sprite>("UI/Sprites/LoginBackGround");
|
| | | useStaticBackGround = sprite != null;
|
| | |
|
| | | if (useStaticBackGround)
|
| | | {
|
| | | m_BackGroundImage.overrideSprite = sprite;
|
| | | m_StaticBackGround.gameObject.SetActive(true);
|
| | | m_DynamicBackGround.gameObject.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_StaticBackGround.gameObject.SetActive(false);
|
| | | m_DynamicBackGround.gameObject.SetActive(true);
|
| | | }
|
| | |
|
| | | if (loginEffect != null)
|
| | | {
|
| | | loginEffect.gameObject.SetActive(false);
|
| | |
| | | {
|
| | | base.OnActived();
|
| | |
|
| | | if (m_SkeletonGraphic != null)
|
| | | if (!useStaticBackGround)
|
| | | {
|
| | | m_SkeletonGraphic.AnimationState.SetEmptyAnimations(0);
|
| | | if (m_SkeletonGraphic != null)
|
| | | {
|
| | | m_SkeletonGraphic.AnimationState.SetEmptyAnimations(0);
|
| | | }
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | | public void ShowLoginEffect()
|
| | | {
|
| | | if (loginEffect != null)
|
| | | if (!useStaticBackGround)
|
| | | {
|
| | | loginEffect.gameObject.SetActive(true);
|
| | | }
|
| | | if (loginEffect != null)
|
| | | {
|
| | | loginEffect.gameObject.SetActive(true);
|
| | | }
|
| | |
|
| | | if (m_SkeletonGraphic != null)
|
| | | {
|
| | | m_SkeletonGraphic.AnimationState.SetAnimation(0, "animation2", true);
|
| | | if (m_SkeletonGraphic != null)
|
| | | {
|
| | | m_SkeletonGraphic.AnimationState.SetAnimation(0, "animation2", true);
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | }
|