51 lines
1.2 KiB
C#
51 lines
1.2 KiB
C#
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
|
|
public class ShopPackageItem : MonoBehaviour
|
|
{
|
|
public Text nameText;
|
|
|
|
public Text amountText;
|
|
|
|
public int index;
|
|
|
|
public GameManager.ItemType itemType;
|
|
|
|
public int itemID;
|
|
|
|
private ShopManager shopManager;
|
|
|
|
private ShopPackagePage shopPackagePage;
|
|
|
|
private void Start()
|
|
{
|
|
shopManager = Object.FindObjectOfType<ShopManager>();
|
|
shopPackagePage = Object.FindObjectOfType<ShopPackagePage>();
|
|
}
|
|
|
|
private void FixedUpdate()
|
|
{
|
|
}
|
|
|
|
private ShopManager.Categories CastItemTypeToShopCategory(GameManager.ItemType _itemType)
|
|
{
|
|
return itemType switch
|
|
{
|
|
GameManager.ItemType.Rod => ShopManager.Categories.Rods,
|
|
GameManager.ItemType.Reel => ShopManager.Categories.Reels,
|
|
GameManager.ItemType.Line => ShopManager.Categories.Lines,
|
|
GameManager.ItemType.Leader => ShopManager.Categories.Leaders,
|
|
GameManager.ItemType.Float => ShopManager.Categories.Floats,
|
|
GameManager.ItemType.Hook => ShopManager.Categories.Hooks,
|
|
GameManager.ItemType.Bait => ShopManager.Categories.Baits,
|
|
GameManager.ItemType.Feeder => ShopManager.Categories.Feeders,
|
|
GameManager.ItemType.Weight => ShopManager.Categories.Weights,
|
|
_ => ShopManager.Categories.Rods,
|
|
};
|
|
}
|
|
|
|
public void SelectItem()
|
|
{
|
|
}
|
|
}
|