public List<Store_Item_Info_Table> GetStoreItemInfo(eCLASS _eClass, eStore_ItemKind _eKind, int _npcID) { List<Store_Item_Info_Table> returnList = new List<Store_Item_Info_Table>(); if (!m_ResourceTable.ContainsKey(_npcID)) return returnList; List<Store_Item_Info_Table> listStoreItemInfo = m_ResourceTable[_npcID].GetNpcStoreItems(_eClass, _eKind); List<Store_Item_Info_Table> listStoreItemInfoAll = m_ResourceTable[_npcID].GetNpcStoreItems(eCLASS.All, _eKind); if (listStoreItemInfo != null) returnList.AddRange(listStoreItemInfo); if (listStoreItemInfoAll != null) returnList.AddRange(listStoreItemInfoAll); return returnList; }
public void AddStoreItemInfoKind(eStore_ItemKind _storeItemKind, Store_Item_Info_Table _storeItemElement) { if (!dicData.ContainsKey(_storeItemKind)) dicData.Add(_storeItemKind, new List<Store_Item_Info_Table>()); dicData[_storeItemKind].Add(_storeItemElement); }
public List<Store_Item_Info_Table> GetNpcStoreItems(eCLASS _class, eStore_ItemKind _eKind) { if (!dicStoreItemByClass.ContainsKey(_class)) return new List<Store_Item_Info_Table>(); return dicStoreItemByClass[_class].GetStoreItemKind(_eKind); }
public List<Store_Item_Info_Table> GetStoreItemKind(eStore_ItemKind _kind) { if (dicData.ContainsKey(_kind)) return dicData[_kind]; else return null; }
protected override void ChangeKindTypeDelegate( ref POINTER_INFO ptr) { base.ChangeKindTypeDelegate( ref ptr); if( ptr.evt == POINTER_INFO.INPUT_EVENT.TAP) { UIRadioBtn radio = ( UIRadioBtn)ptr.targetObj; nowItemKind = ( eStore_ItemKind)radio.Data; PlayerPrefs.SetInt( "NpcStoreKind", ( int)nowItemKind); PlayerPrefs.Save(); Debug.LogWarning( nowClass); SetStoreItem( nowNpcID, nowClass); } }
protected override void SetStoreItem( int _npcID, eCLASS _class) { // check saved kind if( PlayerPrefs.HasKey( SaveKindKey)) { eStore_ItemKind savedKind = ( eStore_ItemKind)PlayerPrefs.GetInt( SaveKindKey); List<eStore_ItemKind> listKind = AsTableManager.Instance.GetHaveItemKind( _npcID, _class); if( listKind.Contains( savedKind)) { nowItemKind = savedKind; dicItemKindBtn[nowItemKind].Value = true; } } else dicItemKindBtn[nowItemKind].Value = true; List<Store_Item_Info_Table> storeItemList = AsTableManager.Instance.GetStoreItems( _class, nowItemKind, _npcID); AddStoreItems( storeItemList); }
protected override void RepositionKindBtn( int _npcId, eCLASS _eClass) { List<eStore_ItemKind> listKind = AsTableManager.Instance.GetHaveItemKind( _npcId, _eClass); foreach ( UIRadioBtn button in radioBtns) button.gameObject.SetActiveRecursively( false); int count = 0; foreach ( eStore_ItemKind kind in kinds) { if( listKind.Contains( kind)) { if( count == 0) nowItemKind = kind; dicItemKindBtn[kind].gameObject.SetActiveRecursively( true); dicItemKindBtn[kind].transform.localPosition = radioBtnPositions[count]; count++; } } dicItemKindBtn[nowItemKind].Value = true; }
public List<Store_Item_Info_Table> GetStoreItems( eCLASS _eClass, eStore_ItemKind _eStoreItemKind, int _npcID) { return m_Tbl_Store.GetStoreItemInfo( _eClass, _eStoreItemKind, _npcID); }