Ejemplo n.º 1
0
        private EffectObject CreateDingqueEffect(IList <EffectObject> list, int chair, PoolObjectType effectType)
        {
            EffectObject effect = MahjongUtility.PlayMahjongEffect(effectType);

            mDingquEffectCache[chair].Add(effect);
            var item = MahjongUtility.GetYxGameData().GetPlayerInfoItem <PlayerInfoItem>(chair);

            if (null != item)
            {
                var iamge = item.Owner.ExCompShow().GetComponent <Image>();
                iamge.enabled = false;
                effect.ExSetParent(iamge.transform);
            }
            return(effect);
        }
Ejemplo n.º 2
0
 private void PlayEffect(Transform effectPos, PoolObjectType type)
 {
     effectPos.Do((o) =>
     {
         string name      = type.ToString();
         EffectObject obj = GameCenter.Pools.GetPool <ObjectPoolComponent>(PoolUitlity.Po_EffectObject).Pop <EffectObject>(EffectObject.AssetsNamePrefix + name, (go) =>
         {
             return(go.Type == type);
         });
         if (obj != null)
         {
             obj.ExSetParent(o);
             obj.Execute();
         }
     });
 }
Ejemplo n.º 3
0
        /// <summary>
        /// 播放3d特效
        /// </summary>
        public void PlayPlayerEffect(int chair, PoolObjectType type)
        {
            Transform effectPos = MahjongGroups.EffectposGroup[chair];

            effectPos.Do((o) =>
            {
                string name      = type.ToString();
                EffectObject obj = GameCenter.Pools.GetPool <ObjectPoolComponent>(PoolUitlity.Po_EffectObject)
                                   .Pop <EffectObject>(EffectObject.AssetsNamePrefix + name, (go) =>
                {
                    return(go.Type == type);
                });
                if (obj != null)
                {
                    obj.ExSetParent(o);
                    obj.Execute();
                }
            });
        }