First of all sorry for my poor English and my bad explanation, I will try my best.
So I have two arrays that contains houseFailed and houseDelivered in them. And in each of those object contains a bool, so I want to check if one of those bool is true from all the objects inside the array. If you find my explanation is missing something, etc. Feel free to ask!
public houseDelivered[] deliveredArea;
public houseFailed[] failedArea;
if (activeHouse)
{
//Check if one of the paper is delivered
foreach (houseDelivered delivered in deliveredArea)
{
//Check if one of the paper is failed
foreach (houseFailed failed in failedArea)
{
//Entered deliver area
if (delivered.isDelivered && !failed.isFailed)
{
houseComplete = true;
}
//Leaving deliver area
else if (!delivered.isDelivered)
{
houseComplete = false;
}
//Failed delivery
if (failed.isFailed)
{
houseComplete = false;
houseFailed = true;
}
}
}