private int swapCounter;
private void Update()
{
if(Input.GetKeyDown(KeyCode.A))
{
swapCounter = swapCounter == 10 - 1 ? 0 : swapCounter + 1;
Debug.Log(swapCounter);
}
}
Unity (三元运算符)0到10数据循环
猜你喜欢
转载自blog.csdn.net/qiao2037641855/article/details/123871597
今日推荐
周排行