| | |
| | | }
|
| | | }
|
| | |
|
| | | UIEffect m_AvatarUIEffect;
|
| | | private UIEffect avatarUIEffect
|
| | | EffectPlayer m_AvatarUIEffect;
|
| | | private EffectPlayer avatarUIEffect
|
| | | {
|
| | | get
|
| | | {
|
| | | if (m_AvatarUIEffect == null)
|
| | | {
|
| | | m_AvatarUIEffect = this.GetComponent<UIEffect>("AvatarCell/Img_Avatar");
|
| | | m_AvatarUIEffect = this.GetComponent<EffectPlayer>("AvatarCell/Img_Avatar");
|
| | | }
|
| | | return m_AvatarUIEffect;
|
| | | }
|
| | | }
|
| | |
|
| | | UIEffect m_AvatarFrameUIEffect;
|
| | | private UIEffect avatarFrameUIEffect
|
| | | EffectPlayer m_AvatarFrameUIEffect;
|
| | | private EffectPlayer avatarFrameUIEffect
|
| | | {
|
| | | get
|
| | | {
|
| | | if (m_AvatarFrameUIEffect == null)
|
| | | {
|
| | | m_AvatarFrameUIEffect = this.GetComponent<UIEffect>("AvatarCell/Img_AvatarFrame");
|
| | | m_AvatarFrameUIEffect = this.GetComponent<EffectPlayer>("AvatarCell/Img_AvatarFrame");
|
| | | }
|
| | | return m_AvatarFrameUIEffect;
|
| | | }
|
| | |
| | |
|
| | | private void InitAvatarUI(int avatarID, int avatarUIEffectID)
|
| | | {
|
| | | avatarUIEffect.Stop();
|
| | | avatarUIEffect?.Stop();
|
| | | avatarUIFrame.enabled = false;
|
| | | if (!PlayerFaceConfig.HasKey(avatarID))
|
| | | return;
|
| | |
| | |
|
| | | if (!EffectConfig.HasKey(avatarUIEffectID))
|
| | | return;
|
| | | avatarUIEffect.effect = avatarUIEffectID;
|
| | | avatarUIEffect.loop = true;
|
| | | avatarUIEffect.effectId = avatarUIEffectID;
|
| | | // avatarUIEffect.loop = true;
|
| | | avatarUIEffect.Play();
|
| | | }
|
| | |
|
| | | private void InitAvatarFrameUI(int avatarFrameID, int avatarFrameUIEffectID)
|
| | | {
|
| | | avatarFrameUIEffect.Stop();
|
| | | avatarFrameUIEffect?.Stop();
|
| | | avatarFrameUIFrame.enabled = false;
|
| | | if (!PlayerFacePicConfig.HasKey(avatarFrameID))
|
| | | return;
|
| | |
| | |
|
| | | if (!EffectConfig.HasKey(avatarFrameUIEffectID))
|
| | | return;
|
| | | avatarUIEffect.effect = avatarFrameUIEffectID;
|
| | | avatarUIEffect.loop = true;
|
| | | avatarUIEffect.effectId = avatarFrameUIEffectID;
|
| | | // avatarUIEffect.loop = true;
|
| | | avatarUIEffect.Play();
|
| | | }
|
| | | }
|