if (bagnum <= 0)
{
}
else
{
if (grid1b)
{
grid2.GetComponent<Image>().sprite = zb1.GetComponent<Image>().sprite;
grid2b = true;
}
else if (grid2b)
{
grid3.GetComponent<Image>().sprite = zb1.GetComponent<Image>().sprite;
grid3b = true;
}
else if (grid3b)
{
grid4.GetComponent<Image>().sprite = zb1.GetComponent<Image>().sprite;
grid4b = true;
}
else if (grid4b)
{
grid5.GetComponent<Image>().sprite = zb1.GetComponent<Image>().sprite;
grid5b = true;
}
else if (grid5b)
{
grid6.GetComponent<Image>().sprite = zb1.GetComponent<Image>().sprite;
grid6b = true;
}
else if (grid6b)
{
grid7.GetComponent<Image>().sprite = zb1.GetComponent<Image>().sprite;
grid7b = true;
}
else
{
grid1.GetComponent<Image>().sprite = zb1.GetComponent<Image>().sprite;
grid1b = true;
}
}
#不执行,怎么修改,只执行了if和else,else if没有执行