| | |
| | | private string qualityPath = "UI/Endless/BuffQuality/"; |
| | | public ParticleSystem myPS;//播放粒子特效 |
| | | GameObject psParent; |
| | | |
| | | public BuffFly buffFly;//确定后的飞动脚本 |
| | | private void Start() |
| | | { |
| | | if (psParent == null && myPS != null) |
| | |
| | | |
| | | public void OnClick() |
| | | { |
| | | AudioSourceManager.Ins.Play(AudioEnum.ChooseBuff); |
| | | //判断是否是金钱 |
| | | if (isGold) |
| | | { |
| | | AudioSourceManager.Ins.Play(AudioEnum.Gold); |
| | | } |
| | | else |
| | | { |
| | | AudioSourceManager.Ins.Play(AudioEnum.UI); |
| | | } |
| | | |
| | | if (OnSelectBuffCompleted != null) |
| | | OnSelectBuffCompleted(Index); |
| | | } |
| | | |
| | | public void Fly() |
| | | { |
| | | if (buffFly != null) |
| | | { |
| | | buffFly.SetIcon(Icon.sprite); |
| | | buffFly.SetQuality(QualityImage.sprite); |
| | | buffFly.SetName(Name.text); |
| | | buffFly.SetEffect(Effect.text); |
| | | buffFly.SetRare(Name.color); |
| | | buffFly.Fly(); |
| | | } |
| | | |
| | | } |
| | | |
| | | public void SetIcon(int resId) |
| | |
| | | Name.color = EndlessBuffData.GetColorByRare(rare); |
| | | } |
| | | |
| | | bool isGold;//是否是金币BUFF |
| | | public void SetIsGold(bool isGold) |
| | | { |
| | | this.isGold = isGold; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 设置选中状态,做个缓动播放粒子特效 |