| | |
| | | private string iconPath = "UI/Endless/BuffIcon/"; |
| | | |
| | | private string qualityPath = "UI/Endless/BuffQuality/"; |
| | | |
| | | public ParticleSystem myPS;//播放粒子特效 |
| | | GameObject psParent; |
| | | private void Start() |
| | | { |
| | | |
| | | if (psParent == null) |
| | | { |
| | | psParent = myPS.transform.parent.gameObject; |
| | | } |
| | | } |
| | | |
| | | public void OnClick() |
| | |
| | | Name.color = EndlessBuffData.GetColorByRare(rare); |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 设置选中状态,做个缓动播放粒子特效 |
| | | /// </summary> |
| | |
| | | BorderImage.gameObject.SetActive(selected); |
| | | |
| | | if (selected) |
| | | { |
| | | DOTween.To(() => transform.localScale, (v) => transform.localScale = v, new Vector3(1f, 1f, 1f), 0.15f); |
| | | if (!psParent.activeSelf) psParent.SetActive(true); |
| | | myPS.Play(); |
| | | } |
| | | else |
| | | { |
| | | DOTween.To(() => transform.localScale, (v) => transform.localScale = v, new Vector3(0.87f, 0.87f, 0.87f), 0.15f); |
| | | myPS.Stop(); |
| | | if (psParent.activeSelf) psParent.SetActive(false); |
| | | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |