//--------------------------------------------------------
|
// [Author]: 第二世界
|
// [ Date ]: Tuesday, April 03, 2018
|
//--------------------------------------------------------
|
|
using System;
|
using System.Collections;
|
using System.Collections.Generic;
|
using UnityEngine;
|
using UnityEngine.UI;
|
using Spine.Unity;
|
|
namespace Snxxz.UI
|
{
|
|
public class LaunchBackGroundWin : Window
|
{
|
[SerializeField] SkeletonGraphic m_SkeletonGraphic;
|
|
GameObject loginEffect;
|
|
#region Built-in
|
protected override void BindController()
|
{
|
loginEffect = this.transform.Find("Pivot/Effect_DengLu").gameObject;
|
}
|
|
protected override void AddListeners()
|
{
|
}
|
|
protected override void OnPreOpen()
|
{
|
if (loginEffect != null)
|
{
|
loginEffect.gameObject.SetActive(false);
|
}
|
}
|
|
protected override void OnAfterOpen()
|
{
|
}
|
|
protected override void OnPreClose()
|
{
|
Resources.UnloadAsset(m_SkeletonGraphic.material);
|
}
|
|
protected override void OnAfterClose()
|
{
|
}
|
|
protected override void OnActived()
|
{
|
base.OnActived();
|
|
if (m_SkeletonGraphic != null)
|
{
|
m_SkeletonGraphic.AnimationState.SetEmptyAnimations(0);
|
}
|
}
|
#endregion
|
|
public void ShowLoginEffect()
|
{
|
if (loginEffect != null)
|
{
|
loginEffect.gameObject.SetActive(true);
|
}
|
|
if (m_SkeletonGraphic != null)
|
{
|
m_SkeletonGraphic.AnimationState.SetAnimation(0, "animation2", true);
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|