Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void OnGUI () {
- // code
- for (int i = 0; i < contentList.Count; i ++) {
- if (contentList[i] != null) {
- // currentToolTip = "ToolTip";
- Debug.Log ("contentList[i]: " + contentList[i]);
- Debug.Log ("contentList[i].itemName: " + contentList[i].itemName);
- SetToolTip (contentList[i]);
- if (GUI.Button (new Rect (0, startY, 120, 30),
- new GUIContent (contentList[i].itemName, contentList[i].itemIcon, currentToolTip))) {
- AddItem(contentList[i]);
- contentList[i] = null;
- currentLootableItem.UpdateLootList(contentList);
- }
- startY = startY + 35;
- }
- }
- // code
- }
- void SetToolTip (InventoryItem thisItem) {
- currentToolTip = thisItem.itemName + " " + thisItem.healthBonus + "/" + thisItem.strengthBonus + "/" + thisItem.armorBonus;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement