If statement 如果满足if语句,如何添加3(Unity3d)

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;

我正在尝试做一个if语句,每次满足if语句时,它会给iteger增加3。我知道如何使用
coins++
添加1,但有没有办法添加3

if (other.tag == "yes") 
{
  coins + 3;
}               
是一种比
coins=coins+3更紧凑的方式

coins += 3;