Ejemplo n.º 1
0
    private void OnClick_Seed(int index)
    {
        WPData_Seed seedData = WPGameDataManager.instance.GetData <WPData_Seed>(WPEnum.GameData.eSeed)[index];

        if (seedData != null)
        {
            WPUI_BookItemInfo bookItemInfo = WPUIManager_Book.instance.ui_BookItemInfo;
            bookItemInfo.SetSprite_Item(seedSpriteData[index]);
            bookItemInfo.Name.SetText(seedData.Name);
            bookItemInfo.GetImageText_Info(0).SetActive(true);
            bookItemInfo.GetImageText_Info(0).SetText(seedData.Description);
            bookItemInfo.SetActive(true);
        }
    }
Ejemplo n.º 2
0
    private void OnClick_Fertilizer(int index)
    {
        WPData_Fertilizer fertilizerData = WPGameDataManager.instance.GetData <WPData_Fertilizer>(WPEnum.GameData.eFertilizer)[index];

        if (fertilizerData != null)
        {
            WPUI_BookItemInfo bookItemInfo = WPUIManager_Book.instance.ui_BookItemInfo;
            bookItemInfo.SetSprite_Item(fertilizerSpriteData[index]);
            bookItemInfo.Name.SetText(fertilizerData.Name);
            bookItemInfo.GetImageText_Info(0).SetActive(true);
            bookItemInfo.GetImageText_Info(0).SetText(fertilizerData.Description);
            bookItemInfo.GetImageText_Info(1).SetActive(false);
            bookItemInfo.GetImageText_Info(2).SetActive(false);
            bookItemInfo.SetActive(true);
        }
    }