using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class float_code : MonoBehaviour
{


    public Image floatImg;

    public void setFloatImage(int type,int id)
    {//0 种子 1加速剂 2金币 
        if (type == 0)
        {
            floatImg.overrideSprite = Resources.Load(ResourcesUtil.getRes().getSeedRes(id - 1), typeof(Sprite)) as Sprite;
        }
        else if (type == 1)
        {
            floatImg.overrideSprite = Resources.Load(ResourcesUtil.getRes().getJiasujiRes(), typeof(Sprite)) as Sprite;
        }
        else {
            floatImg.overrideSprite = Resources.Load(ResourcesUtil.getRes().getCoinRes(), typeof(Sprite)) as Sprite;
        }
        floatImg.SetNativeSize();
    }

}
