If statement 如果满足if语句,如何添加3(Unity3d)
我正在尝试做一个if语句,每次满足if语句时,它会给iteger增加3。我知道如何使用If statement 如果满足if语句,如何添加3(Unity3d),if-statement,unity3d,If Statement,Unity3d,我正在尝试做一个if语句,每次满足if语句时,它会给iteger增加3。我知道如何使用coins++添加1,但有没有办法添加3 if (other.tag == "yes") { coins + 3; } 是一种比coins=coins+3更紧凑的方式 coins += 3;
coins++
添加1,但有没有办法添加3
if (other.tag == "yes")
{
coins + 3;
}
是一种比coins=coins+3更紧凑的方式代码>
coins += 3;