Beispiel #1
0
        public FXController UF_Create(string name, float size)
        {
            FXController fx = this.UF_Create(name);

            if (fx != null)
            {
                fx.size = size;
            }
            return(fx);
        }
Beispiel #2
0
 private void UF_AddToFXRoot(FXController fx)
 {
     if (fx != null)
     {
         if (m_FXRoot == null)
         {
             m_FXRoot = new GameObject("FX_Root");
             m_FXRoot.transform.position = Vector3.zero;
         }
         fx.UF_SetParent(m_FXRoot.transform);
     }
 }
Beispiel #3
0
        public FXController UF_Create(string name, float size, Vector3 pos, Vector3 euler)
        {
            FXController fx = this.UF_Create(name);

            if (fx != null)
            {
                fx.size     = size;
                fx.position = pos;
                fx.euler    = euler;
            }
            return(fx);
        }
Beispiel #4
0
        //预加载一个特效资源,加载完成马上销毁
        public void UF_PreCreate(string name)
        {
            if (UF_CheckInvalidName(name))
            {
                return;
            }
            FXController fx = this.UF_Create(name);

            if (fx != null)
            {
                fx.Release();
            }
        }
Beispiel #5
0
        //提供特殊接口,为Chain类型特效设置值
        public void UF_PlayChain(string name, string chainName, Vector3 form, Vector3 to, float size)
        {
            FXController fx = this.UF_Create(name, size);

            if (fx != null)
            {
                EChainLine chain = fx.UF_FindEffect(chainName) as EChainLine;
                if (chain != null)
                {
                    chain.SetChain(form, to);
                }
                fx.UF_Play(form, Vector3.zero);
                if (m_IsPause)
                {
                    fx.UF_Pause();
                }
            }
        }
Beispiel #6
0
        public void UF_Play(string name, float size, Vector3 pos, Vector3 euler, int order)
        {
            if (string.IsNullOrEmpty(name))
            {
                return;
            }
            FXController fx = this.UF_Create(name, size, pos, euler);

            if (fx != null)
            {
                fx.sortingOrder = order;
                fx.UF_Play();
                if (m_IsPause)
                {
                    fx.UF_Pause();
                }
            }
        }
Beispiel #7
0
        public FXController UF_Create(string name)
        {
            if (UF_CheckInvalidName(name))
            {
                return(null);
            }
            FXController fx = CEntitySystem.UF_GetInstance().UF_Create <FXController> (name);

            if (fx != null)
            {
                UF_AddToFXRoot(fx);
                fx.UF_SetActive(true);
                //fx.FollowTo (null);
            }
            else
            {
                Debugger.UF_Warn(string.Format("Can not create fx:{0}", name));
            }
            return(fx);
        }