From 252d46b8642ad4ecebe1a8b9d3a0678913413ebf Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期三, 14 十一月 2018 15:30:58 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.87:10010/r/snxxz_scripts
---
System/Store/RuneStoreWin.cs | 338 ++++++++++++++++++++++++++++----------------------------
1 files changed, 169 insertions(+), 169 deletions(-)
diff --git a/System/Store/RuneStoreWin.cs b/System/Store/RuneStoreWin.cs
index d8effb9..ac07c2e 100644
--- a/System/Store/RuneStoreWin.cs
+++ b/System/Store/RuneStoreWin.cs
@@ -1,170 +1,170 @@
-锘�//--------------------------------------------------------
-// [Author]: 绗簩涓栫晫
-// [ Date ]: Monday, September 18, 2017
-//--------------------------------------------------------
-
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using UnityEngine;
-using UnityEngine.UI;
-using TableConfig;
-using System.Text;
-using Snxxz.UI;
-
-namespace Snxxz.UI {
-
- public class RuneStoreWin : StoreUIBasic
- {
- #region 鎴愬憳鍙橀噺
- private ScrollerController _runeCtrl;
- private FuncConfigConfig _tagFuncModel;
- private ItemConfig _tagChinModel;
- private RuneConfig _tagRuneModel;
- private Text _runeChipText;
- #endregion
-
- RuneModel m_RuneModel;
- RuneModel runemodel {
- get {
- return m_RuneModel ?? (m_RuneModel = ModelCenter.Instance.GetModel<RuneModel>());
- }
- }
-
- StoreModel _storeModel;
- StoreModel m_storeModel
- {
- get { return _storeModel ?? (_storeModel = ModelCenter.Instance.GetModel<StoreModel>()); }
- }
-
- PackModelInterface _modelInterface;
- PackModelInterface modelInterface
- {
- get { return _modelInterface ?? (_modelInterface = ModelCenter.Instance.GetModel<PackModelInterface>()); }
- }
- #region Built-in
- protected override void BindController()
- {
- _runeCtrl = transform.Find("RuneCellCtrl").GetComponent<ScrollerController>();
- _runeChipText = transform.Find("RuneBottom/BindChipsCountBG/CountText").GetComponent<Text>();
- _runeCtrl.OnRefreshCell += RefreshShopCell;
- }
-
- protected override void AddListeners()
- {
- }
-
- protected override void OnPreOpen()
- {
-
- m_storeModel.RefreshBuyShopLimitEvent += InitModel;
- model.OnRefreshRuneChip += OnFrenshMoneyInfo;
- _tagFuncModel = Config.Instance.Get<FuncConfigConfig>("RuneShop");
- m_storeModel.storeFuncType = StoreFunc.RuneStore;
- InitModel();
- OnFrenshMoneyInfo();
-
- }
-
- protected override void OnAfterOpen()
- {
- }
-
- protected override void OnPreClose()
- {
- }
-
- protected override void OnAfterClose()
+锘�//--------------------------------------------------------
+// [Author]: 绗簩涓栫晫
+// [ Date ]: Monday, September 18, 2017
+//--------------------------------------------------------
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using UnityEngine.UI;
+using TableConfig;
+using System.Text;
+using Snxxz.UI;
+
+namespace Snxxz.UI {
+
+ public class RuneStoreWin : StoreUIBasic
+ {
+ #region 鎴愬憳鍙橀噺
+ private ScrollerController _runeCtrl;
+ private FuncConfigConfig _tagFuncModel;
+ private ItemConfig _tagChinModel;
+ private RuneConfig _tagRuneModel;
+ private Text _runeChipText;
+ #endregion
+
+ RuneModel m_RuneModel;
+ RuneModel runemodel {
+ get {
+ return m_RuneModel ?? (m_RuneModel = ModelCenter.Instance.GetModel<RuneModel>());
+ }
+ }
+
+ StoreModel _storeModel;
+ StoreModel m_storeModel
{
- m_storeModel.RefreshBuyShopLimitEvent -= InitModel;
- runemodel.OnRefreshRuneChip -= OnFrenshMoneyInfo;
- }
- #endregion
-
- RuneModel m_Model;
- RuneModel model {
- get {
- return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<RuneModel>());
- }
- }
- public void InitModel()
- {
- CreateShopItemCell(_runeCtrl,2);
- }
-
- protected override void CreateShopItemCell(ScrollerController shopCtrl, int row)
- {
- base.CreateShopItemCell(shopCtrl, row);
- }
-
- private void RefreshShopCell(ScrollerDataType type, CellView cell)
- {
- int childCode = 0;
- for (childCode = 0; childCode < cell.transform.childCount; childCode++)
- {
- int cellCount = (cell.transform.childCount) * cell.index + (childCode + 1);
- RuneCell runeCell = cell.transform.GetChild(childCode).GetComponent<RuneCell>();
- if (runeCell == null)
- {
- runeCell = cell.transform.GetChild(childCode).gameObject.AddComponent<RuneCell>();
- }
-
- if (p_shopItemlist.Count >= cellCount)
- {
- StoreConfig shopInfo = p_shopItemlist[cellCount - 1];
- cell.transform.GetChild(childCode).gameObject.SetActive(true);
- ItemConfig chinModel = Config.Instance.Get<ItemConfig>(shopInfo.ItemID);
- if (chinModel != null)
- {
- ItemCellModel cellModel = new ItemCellModel(chinModel.ID,false, 0, shopInfo.IsBind);
- runeCell.itemCell.Init(cellModel);
- string runeStr = model.GetRuneAttrStr(shopInfo.ItemID, 1);
- runeCell.itemNameText.text = runeStr;
- runeCell.converNumText.text = shopInfo.MoneyNumber.ToString();
- RuneTowerFloorConfig runeTowerModel = m_storeModel.SetRuneSource(shopInfo.ItemID);
- if(runeTowerModel != null)
- {
- runeCell.SourceText.gameObject.SetActive(true);
- var tower = Config.Instance.Get<RuneTowerConfig>(runeTowerModel.TowerId);
- runeCell.SourceText.text = StringUtility.Contact(tower.TowerName, runeTowerModel.FloorName);
- }
- else
- {
- runeCell.SourceText.gameObject.SetActive(false);
- }
- //m_storeModel.SetVipLimit(shopInfo);
- }
-
- runeCell.RuneCellBtn.RemoveAllListeners();
- runeCell.RuneCellBtn.AddListener(() => { m_storeModel.OnClickShopCell(shopInfo); });
- runeCell.converBtn.RemoveAllListeners();
- runeCell.converBtn.AddListener(() => { m_storeModel.SendBuyShopItem(shopInfo, 1); });
- }
- else
- {
- cell.transform.GetChild(childCode).gameObject.SetActive(false);
- }
- }
- }
-
- public void OnFrenshMoneyInfo()
- {
- if (PlayerDatas.Instance.baseData != null)
- {
- _runeChipText.text = modelInterface.OnChangeCoinsUnit((uint)runemodel.RuneChip);
- }
- else
- {
- _runeChipText.text = "0";
-
- }
-
- }
-
- }
-
-}
-
-
-
-
+ get { return _storeModel ?? (_storeModel = ModelCenter.Instance.GetModel<StoreModel>()); }
+ }
+
+ PackModelInterface _modelInterface;
+ PackModelInterface modelInterface
+ {
+ get { return _modelInterface ?? (_modelInterface = ModelCenter.Instance.GetModel<PackModelInterface>()); }
+ }
+ #region Built-in
+ protected override void BindController()
+ {
+ _runeCtrl = transform.Find("RuneCellCtrl").GetComponent<ScrollerController>();
+ _runeChipText = transform.Find("RuneBottom/BindChipsCountBG/CountText").GetComponent<Text>();
+ _runeCtrl.OnRefreshCell += RefreshShopCell;
+ }
+
+ protected override void AddListeners()
+ {
+ }
+
+ protected override void OnPreOpen()
+ {
+
+ m_storeModel.RefreshBuyShopLimitEvent += InitModel;
+ model.OnRefreshRuneChip += OnFrenshMoneyInfo;
+ _tagFuncModel = Config.Instance.Get<FuncConfigConfig>("RuneShop");
+ m_storeModel.storeFuncType = StoreFunc.RuneStore;
+ InitModel();
+ OnFrenshMoneyInfo();
+
+ }
+
+ protected override void OnAfterOpen()
+ {
+ }
+
+ protected override void OnPreClose()
+ {
+ }
+
+ protected override void OnAfterClose()
+ {
+ m_storeModel.RefreshBuyShopLimitEvent -= InitModel;
+ runemodel.OnRefreshRuneChip -= OnFrenshMoneyInfo;
+ }
+ #endregion
+
+ RuneModel m_Model;
+ RuneModel model {
+ get {
+ return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<RuneModel>());
+ }
+ }
+ public void InitModel()
+ {
+ CreateShopItemCell(_runeCtrl,2);
+ }
+
+ protected override void CreateShopItemCell(ScrollerController shopCtrl, int row)
+ {
+ base.CreateShopItemCell(shopCtrl, row);
+ }
+
+ private void RefreshShopCell(ScrollerDataType type, CellView cell)
+ {
+ int childCode = 0;
+ for (childCode = 0; childCode < cell.transform.childCount; childCode++)
+ {
+ int cellCount = (cell.transform.childCount) * cell.index + (childCode + 1);
+ RuneCell runeCell = cell.transform.GetChild(childCode).GetComponent<RuneCell>();
+ if (runeCell == null)
+ {
+ runeCell = cell.transform.GetChild(childCode).gameObject.AddComponent<RuneCell>();
+ }
+
+ if (p_shopItemlist.Count >= cellCount)
+ {
+ StoreConfig shopInfo = p_shopItemlist[cellCount - 1].storeConfig;
+ cell.transform.GetChild(childCode).gameObject.SetActive(true);
+ ItemConfig chinModel = Config.Instance.Get<ItemConfig>(shopInfo.ItemID);
+ if (chinModel != null)
+ {
+ ItemCellModel cellModel = new ItemCellModel(chinModel.ID,false, 0, shopInfo.IsBind);
+ runeCell.itemCell.Init(cellModel);
+ string runeStr = model.GetRuneAttrStr(shopInfo.ItemID, 1);
+ runeCell.itemNameText.text = runeStr;
+ runeCell.converNumText.text = shopInfo.MoneyNumber.ToString();
+ RuneTowerFloorConfig runeTowerModel = m_storeModel.SetRuneSource(shopInfo.ItemID);
+ if(runeTowerModel != null)
+ {
+ runeCell.SourceText.gameObject.SetActive(true);
+ var tower = Config.Instance.Get<RuneTowerConfig>(runeTowerModel.TowerId);
+ runeCell.SourceText.text = StringUtility.Contact(tower.TowerName, runeTowerModel.FloorName);
+ }
+ else
+ {
+ runeCell.SourceText.gameObject.SetActive(false);
+ }
+ //m_storeModel.SetVipLimit(shopInfo);
+ }
+
+ runeCell.RuneCellBtn.RemoveAllListeners();
+ runeCell.RuneCellBtn.AddListener(() => { m_storeModel.OnClickShopCell(shopInfo); });
+ runeCell.converBtn.RemoveAllListeners();
+ runeCell.converBtn.AddListener(() => { m_storeModel.SendBuyShopItem(shopInfo, 1); });
+ }
+ else
+ {
+ cell.transform.GetChild(childCode).gameObject.SetActive(false);
+ }
+ }
+ }
+
+ public void OnFrenshMoneyInfo()
+ {
+ if (PlayerDatas.Instance.baseData != null)
+ {
+ _runeChipText.text = modelInterface.OnChangeCoinsUnit((uint)runemodel.RuneChip);
+ }
+ else
+ {
+ _runeChipText.text = "0";
+
+ }
+
+ }
+
+ }
+
+}
+
+
+
+
--
Gitblit v1.8.0