| | |
| | | public class UIEffectPlayer : EffectPlayer |
| | | { |
| | | |
| | | |
| | | |
| | | //spine里的第几个动画 |
| | | public void Play(int index, bool showLog = true) |
| | | public void Play(int index, bool showLog = true, bool closePMA = false) |
| | | { |
| | | playSpineAnimIndex = index; |
| | | PlayAsync(showLog).Forget(); |
| | | PlayAsync(showLog, closePMA).Forget(); |
| | | } |
| | | |
| | | //配置动画组数组索引 |
| | | public void PlayByArrIndex(int index, bool showLog = true) |
| | | public void PlayByArrIndex(int index, bool showLog = true, bool closePMA = false) |
| | | { |
| | | var config = EffectConfig.Get(effectId); |
| | | playSpineAnimIndex = config.animIndex[index]; |
| | | PlayAsync(showLog).Forget(); |
| | | PlayAsync(showLog, closePMA).Forget(); |
| | | } |
| | | |
| | | |
| | |
| | | effectPlayer.SetActive(true); |
| | | return effectPlayer; |
| | | } |
| | | |
| | | |
| | | } |