| | |
| | | ShowUICtrl();
|
| | | }
|
| | |
|
| | | protected override void OnActived()
|
| | | {
|
| | | UpdateFireEffect();
|
| | | }
|
| | |
|
| | | protected override void OnAfterOpen()
|
| | | {
|
| | | this.transform.SetAsLastSibling();
|
| | |
| | | private void RefreshGetIem(int useId, int useCnt, BoxGetItemInfo[] info)
|
| | | {
|
| | | ShowUICtrl();
|
| | | }
|
| | |
|
| | | private void UpdateFireEffect()
|
| | | {
|
| | | if (BoxModel.getItems == null) return;
|
| | |
|
| | | bool isFireBox = false;
|
| | | foreach (var key in ceremonyModel.fireDict.Keys)
|
| | | {
|
| | | StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(ceremonyModel.fireDict[key]);
|
| | | if (storeConfig != null)
|
| | | {
|
| | | if (storeConfig.ItemID == BoxModel.itemId)
|
| | | {
|
| | | isFireBox = true;
|
| | | if (!fireEffect.IsPlaying)
|
| | | {
|
| | | fireEffect.Play();
|
| | | return;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | if(!isFireBox)
|
| | | {
|
| | | fireEffect.Stop();
|
| | | }
|
| | | }
|
| | |
|
| | | private void ShowUICtrl()
|
| | |
| | | else
|
| | | {
|
| | | getCoinsText.gameObject.SetActive(false);
|
| | | }
|
| | |
|
| | | foreach(var key in ceremonyModel.fireDict.Keys)
|
| | | {
|
| | | StoreConfig storeConfig = Config.Instance.Get<StoreConfig>(ceremonyModel.fireDict[key]);
|
| | | if(storeConfig != null)
|
| | | {
|
| | | if(storeConfig.ItemID == BoxModel.itemId)
|
| | | {
|
| | | if (!fireEffect.IsPlaying)
|
| | | {
|
| | | fireEffect.Play();
|
| | | return;
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | if (fireEffect.IsPlaying)
|
| | | {
|
| | | fireEffect.Stop();
|
| | | }
|
| | | }
|
| | |
|