📅  最后修改于: 2022-03-11 14:49:19.434000             🧑  作者: Mango
static int counter = 0;
public int maxstrairs = 100;
void Start()
{
counter++;
if(counter < maxstrairs)
{
dothestairs();
}
}
private void dothestairs()
{
if (counter % 2 == 0)
{
// even
}
else
{
// odd
}
}