C# Basics - Call function when all Markers are giving True result?

Hey, I’ve got an object which is supposed to play an animation when all Markers (child objects checking if there’s something in the way) are giving True Result (so there is nothing in the way). All the calculations must be made in a single frame (so all checks and a signal to play animation must go in one frame).

What should be the logic here?

// functions in child objects that calculate if the path is clear when called and return appropriate results

bool Marker1() {
      // do calculations to check if something is in way and return
}

bool Marker2() {
      // do calculations to check if something is in way and return
}

bool Marker3() {
      // do calculations to check if something is in way and return
}

// Update function in parent obj
void Update() {
       if(Marker1() && Marker2() && Marker3()) {
             // all children calculated that path is clear
             playAnimation();
       }
}

The idea is to add a script on parent object that calls the functions in child objects to calculate if anything is in path and if all return true (nothing is in path) then play the animation. This way you can guarantee that all happened in one frame. Hope this helps!