foreach 循环完全忽略了我的 if 语句。
for(InfoBox infoBox : mAbilities)
{
if(infoBox.CheckPressed(event));
{
//This is being outputted each time, even if the if statement returns false.
System.out.println(infoBox.getName());
}
System.out.println(infoBox.CheckPressed(event));
System.out.println(infoBox.getName());
}