| | |
| | | [SerializeField] Button m_StarUpgrade; |
| | | [SerializeField] RectTransform m_MaxStarLevelHint; |
| | | [SerializeField] EquipStarMaterialCandidateWidget m_MaterialCandidateWidget; |
| | | [SerializeField] UIEffect m_EffectSuccessfu1; |
| | | [SerializeField] UIEffect m_EffectSuccessfu2; |
| | | [SerializeField] UIEffect m_EffectFailed; |
| | | |
| | | List<EquipStarLevelSelectBehaviour> levelBehaviours = new List<EquipStarLevelSelectBehaviour>(); |
| | | |
| | |
| | | { |
| | | var index = model.operateMaterialIndex.Fetch(); |
| | | DisplayMaterialCandidates(index); |
| | | } |
| | | |
| | | if (force || model.starResultEffect.dirty) |
| | | { |
| | | var result = model.starResultEffect.Fetch(); |
| | | model.starResultEffect.value = 0; |
| | | PlayStarUpgradeEffect(result); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } |
| | | |
| | | private void PlayStarUpgradeEffect(int result) |
| | | { |
| | | if (result == 1) |
| | | { |
| | | StopCoroutine("Co_PlaySuccessEffect"); |
| | | StartCoroutine("Co_PlaySuccessEffect"); |
| | | } |
| | | else if (result == -1) |
| | | { |
| | | PlayFailedEffect(); |
| | | } |
| | | } |
| | | |
| | | IEnumerator Co_PlaySuccessEffect() |
| | | { |
| | | m_EffectSuccessfu1.Play(); |
| | | yield return WaitingForSecondConst.WaitMS500; |
| | | m_EffectSuccessfu2.Play(); |
| | | } |
| | | |
| | | private void PlayFailedEffect() |
| | | { |
| | | m_EffectFailed.Play(); |
| | | } |
| | | |
| | | [System.Serializable] |
| | | public class ImageCouple |
| | | { |