标签: c# unity3d unityscript
此运算符|=究竟做了什么? 我在C#
|=
bool shoot = Input.GetButtonDown("Fire1"); shoot |= Input.GetButtonDown("Fire2");
答案 0 :(得分:1)
是OR赋值运算符
相当于:
shoot = shoot | Input.GetButtonDown("Fire2");
请参阅: https://msdn.microsoft.com/en-us/library/h5f1zzaw.aspx