我试图将此代码转换为c#
for ( int k=0; k < 3; k++ )
if ( anim.jointInfo[j].flags & (1 << k) ) {
//....
}
flags: int
jointInfo: List<>
答案 0 :(得分:7)
Gotcha,bool vs int thing
for ( int k=0; k < 3; k++ )
if ( anim.jointInfo[j].flags & (1 << k) != 0) {
//....
}