少年修仙传客户端代码仓库
client_Wu Xijin
2018-08-20 396aec28d436a55673011f09f7282a9fda91f84b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Wednesday, April 11, 2018
//--------------------------------------------------------
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
 
namespace Snxxz.UI {
 
    public class IsPlayerUIeffect:MonoBehaviour {
        [SerializeField] UIEffect m_UIEffect;
        [SerializeField] bool m_IsPlayerUieffect=false;
        [SerializeField] Image m_Image;
        [SerializeField] RayAccepter m_RayAccepter;
        public int RedPointId = 0;
        public bool IsPlayerUieffect
        {
            get { return m_IsPlayerUieffect; }
            set { m_IsPlayerUieffect = value;}
        }
        public void  GetIsPlayUieffect()//淡出时
        {
            m_Image.raycastTarget = false;
            m_RayAccepter.raycastTarget = false;
            if (m_UIEffect.IsPlaying)
            {
                m_UIEffect.Stop();
                m_IsPlayerUieffect = true;
            }
            else
            {
                m_IsPlayerUieffect = false;
            }
        }
 
        public void IsStarPlayUieffect()//淡入时
        {
            m_Image.raycastTarget = true;
            m_RayAccepter.raycastTarget = true;
            if (m_IsPlayerUieffect)
            {
                m_UIEffect.Play();
            }
 
        }
 
    }
 
}