//事件回调 public void onEnter(Transform GridTrans) //当鼠标进入 { Items item = ItemModel.GetItem(GridTrans.name); //取得格子内对应物品 UI.updateToolTip(item.Name); //更新提示框内显示的文字 isshow = true; }
public void onEnter(Transform GridTrans) { Items item = ItemModel.GetItem(GridTrans.name); if (item == null) { return; } UI.updateToolTip(item.Name); isshow = true; UI.show(); }