public void AddToTechnologyDic(ConfigTechnologyData _tempData) { if (!m_ownTechList.Contains(_tempData)) { Debug.LogWarning("-------addOwn:" + _tempData.Id); m_ownTechList.Add(_tempData); } if (_tempData.EffectDataList != null && _tempData.EffectDataList.Count > 0) { for (int i = 0; i < _tempData.EffectDataList.Count; i++) { var _tempEffectData = _tempData.EffectDataList[i]; var _effectid = _tempEffectData.EffectId; var _resultId = _tempEffectData.ResultNum; if (!m_technologyEffect.ContainsKey(_effectid)) { m_technologyEffect.Add(_effectid, new List <ConfigTechnologyData>()); } m_technologyEffect[_effectid].Add(_tempData); } } if (OnRefreshTech != null) { OnRefreshTech(); } }
protected override void OnCreate(object arg = null) { if (arg != null) { thisTopData = (ConfigTechnologyData)arg; m_skillId = thisTopData.Id; firstItem.Create(thisTopData); } }
protected override void OnCreate(object arg = null) { if (arg != null) { thisTechnologyData = (ConfigTechnologyData)arg; } var tempEffectId = TechnologyManager.Instance.TechEffectId; // FormTool.Instance.SetWork(tempEffectId); selfBtn.onClick.AddListener(OnClickSelf); selfBtn.image.sprite = Resources.Load <Sprite>(thisTechnologyData.IconAssetPath); string _showname = thisTechnologyData.TechnologyName + " id:" + thisTechnologyData.Id.ToString(); contentText.text = _showname; normalText.text = _showname; }
protected override void OnCreate(object arg = null) { if (arg != null) { m_thisTechData = (ConfigTechnologyData)arg; m_thisTechId = m_thisTechData.Id; m_costGold = m_thisTechData.OriginalCost; btnShowImg.sprite = Resources.Load <Sprite>(m_thisTechData.IconAssetPath); m_showName = m_thisTechData.Name; contentText.text = m_showName; normalText.text = m_showName; if (PostItems.Length > 0 && m_thisTechData.SonList.Count > 0) { for (int i = 0; i < PostItems.Length; i++) { PostItems[i].Create(m_thisTechData.SonList[i]); } } else if (PostItems.Length > 0 && m_thisTechData.SonList.Count <= 0) { for (int i = 0; i < PostItems.Length; i++) { PostItems[i].gameObject.SetActive(false); } } if (TechnologyManager.Instance.OwnTechList.Contains(m_thisTechData)) { Debug.LogWarning("Contain--" + m_thisTechId); btnShowImg.gameObject.SetActive(true); } else { btnShowImg.gameObject.SetActive(false); } } techBtn.onClick.AddListener(OnClickTech); }
private void OnClickTech(ConfigTechnologyData techData) { Debug.Log("--onclik--tech:" + techData.Id + " listnum: " + techData.EffectDataList.Count); SetClickBolck(false); }
/// <summary> /// 初始科技 /// </summary> /// <param name="_tempData"></param> public void SetBornTechnology(ConfigTechnologyData _tempData) { m_bornTechnology = _tempData; AddToTechnologyDic(m_bornTechnology); }
public void AddToTopTech(ConfigTechnologyData _data) { m_topTechnologyList.Add(_data); }
private void OnRefeshTechnology(ConfigTechnologyData techData) { RefreshTech(); }