Example #1
0
 @Override
 public void setAbleToShootThrough(WeaponCategory category, boolean able) {
   if (able) {
     shootThrough |= 1 << category.getId();
   } else {
     shootThrough &= ~(1 << category.getId());
   }
 }
Example #2
0
 @Override
 public boolean isAbleToShootThrough(WeaponCategory weaponCategory) {
   return ((shootThrough >> weaponCategory.getId()) & 1) != 0;
 }