//--------------------------------------------------------
|
// [Author]: 第二世界
|
// [ Date ]: Wednesday, April 11, 2018
|
//--------------------------------------------------------
|
using UnityEngine;
|
using System.Collections;
|
using UnityEngine.UI;
|
|
namespace vnxbqy.UI
|
{
|
|
public class IsPlayerUIeffect : MonoBehaviour
|
{
|
[SerializeField] UIEffect m_UIEffect;
|
[SerializeField] Image m_Image;
|
[SerializeField] RayAccepter m_RayAccepter;
|
public int RedPointId = 0;
|
private bool m_IsPlayUIEffect = false;
|
public void ObtainPlayUIEffect()//淡入时(特效隐藏)
|
{
|
m_Image.raycastTarget = false;
|
m_RayAccepter.raycastTarget = false;
|
if (m_UIEffect.IsPlaying)
|
{
|
m_UIEffect.Stop();
|
m_IsPlayUIEffect = true;
|
}
|
else
|
{
|
m_IsPlayUIEffect = false;
|
}
|
}
|
|
public void StartPlayUIEffect()//淡出时(播放特效)
|
{
|
m_Image.raycastTarget = true;
|
m_RayAccepter.raycastTarget = true;
|
if (m_IsPlayUIEffect)
|
{
|
m_UIEffect.Play();
|
m_IsPlayUIEffect = false;
|
}
|
}
|
|
}
|
|
}
|
|
|
|