新增脚本
This commit is contained in:
@@ -95,8 +95,8 @@ namespace NBF
|
||||
// var role = Game.Main.GetComponent<Role>();
|
||||
// var roleBag = role.GetComponent<RoleBag>();
|
||||
|
||||
// List<object> items = roleBag.GetItemListData();
|
||||
// List.SetListData(items);
|
||||
List<object> items = RoleModel.Instance.GetItemListData(_itemTypes.ToArray());
|
||||
List.SetListData(items);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -94,7 +94,8 @@ namespace NBF
|
||||
if (context.data is BagSlotItem bagSlotItem)
|
||||
{
|
||||
_lastSelectedItem = bagSlotItem.Index;
|
||||
BagSelectPanel.Show(SelectCallback, ItemType.Rod, ItemType.Bobber, ItemType.Reel);
|
||||
BagSelectPanel.Show(SelectCallback, ItemType.Rod, ItemType.Bobber, ItemType.Reel, ItemType.Bait,
|
||||
ItemType.Hook, ItemType.Line, ItemType.Lure);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,11 +30,9 @@ namespace NBF
|
||||
public void SetInfo(ItemInfo itemInfo)
|
||||
{
|
||||
_usedItems.Clear();
|
||||
// var role = Game.Main.GetComponent<Role>();
|
||||
// _bag = role.GetComponent<RoleBag>();
|
||||
|
||||
Info = itemInfo;
|
||||
// _bindItems = _bag.GetBindItems(Info.Id);
|
||||
_bindItems = RoleModel.Instance.GetBindItems(Info.Id);
|
||||
var types = itemInfo.GetBindConfig();
|
||||
List.RemoveChildrenToPool();
|
||||
if (types != null)
|
||||
@@ -87,12 +85,12 @@ namespace NBF
|
||||
{
|
||||
if (_lastSelectedItem == null) return;
|
||||
Log.Info($"选中id={selectId}");
|
||||
// _bag.AddRig(Info.Id, selectId, _lastSelectedItem.RigId).OnCompleted(ChangeInfo);
|
||||
RoleModel.Instance.AddRig(Info.Id, selectId, _lastSelectedItem.RigId).OnCompleted(ChangeInfo);
|
||||
}
|
||||
|
||||
private void CloseCallback(long id, long removeId)
|
||||
{
|
||||
// _bag.RemoveRig(Info.Id, removeId).OnCompleted(ChangeInfo);
|
||||
RoleModel.Instance.RemoveRig(Info.Id, removeId).OnCompleted(ChangeInfo);
|
||||
}
|
||||
|
||||
private void ChangeInfo()
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace NBF
|
||||
bool _cacheTexture;
|
||||
// Vector3 _rotating;
|
||||
|
||||
const int RENDER_LAYER = 0;
|
||||
const int RENDER_LAYER = 22;
|
||||
const int HIDDEN_LAYER = 10;
|
||||
|
||||
public ModelViewRenderImage(GGraph holder)
|
||||
|
||||
@@ -35,6 +35,7 @@ namespace NBF
|
||||
|
||||
// BagPanel.Show();
|
||||
// BagSlotPanel.Show();
|
||||
|
||||
// FishingShopPanel.Show();
|
||||
|
||||
Del();
|
||||
|
||||
Reference in New Issue
Block a user