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); }
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(); } }); }
/// <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(); } }); }