using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ResourcesUtil
{
    private string[] goodsName = { "白菜", "番茄", "南瓜", "萝卜", "玉米", "茄子", "西瓜", "葡萄", "草莓" };
    private string[] fruitPath =
        { "LandFruit/baicai_fruit",
        "LandFruit/fanqiei_fruit",
        "LandFruit/nangua_fruit",
        "LandFruit/luobo_fruit",
        "LandFruit/yumi_fruit",
        "LandFruit/qiezi_fruit",
        "LandFruit/xigua_fruit",
        "LandFruit/putao_fruit",
        "LandFruit/caomei_fruit" };

    private string[] unLockLandPath =
        { "JieSuoLand/baicai_land",
        "JieSuoLand/fanqie_land",
        "JieSuoLand/nangua_land",
        "JieSuoLand/luobo_land",
        "JieSuoLand/yumi_land",
        "JieSuoLand/qie_zi_land",
        "JieSuoLand/xigua_land",
        "JieSuoLand/putao_land",
        "JieSuoLand/caomei_land" };
    private string[] fruit_ChengshuPath =
       { "Chengshu/baicai_chengshu",
        "Chengshu/xihongshi_chengshu",
        "Chengshu/nangua_chengshu",
        "Chengshu/luobo_chengshu",
        "Chengshu/yumi_chengshu",
        "Chengshu/qiezi_chengshu",
        "Chengshu/xigua_chengshu",
        "Chengshu/putao_chengshu",
        "Chengshu/caomei_chengshu" };
    private string[] fruit_SeedPath =
   { "Seed/baicai_seed",
        "Seed/fanqie_seed",
        "Seed/nangua_seed",
        "Seed/luobo_seed",
        "Seed/yumi_seed",
        "Seed/qiezi_seed",
        "Seed/xigua_seed",
        "Seed/putao_seed",
        "Seed/caomei_seed" };
    private string[] landPath =
        { "Land/landGreed",
        "Land/landUnLand",
        "Land/landYellow" };

    private static ResourcesUtil instance;

    public static ResourcesUtil getRes()
    {
        if (instance == null)
        {
            instance = new ResourcesUtil();
        }
        return instance;
    }

    public string getFruitRes(int index)
    {
        return fruitPath[index];
    }
    //种子
    public string getSeedRes(int index)
    {
        return fruit_SeedPath[index];
    }
    //解锁土地
    public string getUnLandRes(int index)
    {
        return unLockLandPath[index];
    }
    //名字
    public string getName(int index)
    {
        return goodsName[index];
    }
    //土地地块
    public string getLandRes(int index)
    {
        if (index >= landPath.Length)
        {
            index = 0;
        }
        return landPath[index];
    }
    //成熟路径
    public string getChengshuRes(int index)
    {
        if (index >= fruit_ChengshuPath.Length)
        {
            index = 0;
        }
        return fruit_ChengshuPath[index];
    }
    //加速剂
    public string getJiasujiRes()
    {
        return "Seed/caomei_seed";
    }
    //金币
    public string getCoinRes()
    {
        return "Seed/BigCoin";
    }
}
