using UnityEngine; using UnityEngine.UI; using System.Collections; using System.Collections.Generic; using GCGame.Table; using Games.LogicObj; using Games.Mission; using Games.GlobeDefine; using Module.Log; using Games.Item; public class AutoComplateCircle : UIControllerBase { #region UI public UIContainerBase _rewContainer; public Text _descText; //消耗描述 #endregion public void Close() { UIManager.CloseUI(UIInfo.AutoComplateCircle); } #region show //生成奖励 private RetAutoCompleteCircleMission _packet = null; public void OnPacket(RetAutoCompleteCircleMission packet) { _packet = packet; } IEnumerator CreateRewItem() { yield return new WaitForEndOfFrame(); List _infoList = new List(); for(int index = 0; index < _packet._rewList.Count; index++) { CommonItemContainerItem.ItemInfo info = new CommonItemContainerItem.ItemInfo(); info.itemID = _packet._rewList[index]._itemDataId; info.itemNum = _packet._rewList[index]._itemCount; info.itemSprite = null; info.itemQuality = null; } if (_infoList.Count > 0) _rewContainer.InitContentItem(_infoList); yield break; } private int _costMoneyType; private int _costValue; private void InitCostText(int type, int val) { _costMoneyType = type; _costValue = val; _descText.text = StrDictionary.GetClientDictionaryString("#{48308}", val, GCGame.Utils.GetMoneyName(type)); } #endregion #region btns public void OnBtnOk() { if (JudgeMoneyLogic.IsMoneyEnough((MONEYTYPE)_costMoneyType, _costValue)) { ReqAutoCompleteCircleMissionOkBtn req = new ReqAutoCompleteCircleMissionOkBtn(); req._flag = 1; req.SendMsg(); } Close(); } public void OnBtnCancle() { Close(); } #endregion }