I am trying to create a quest giving system this way:
There are 7 boolean values and a method that should be called only when any 3 out of the 7 boolean values evaluates to true. What is the most efficient/better way to accomplish this task? I am a bit new to programming so here is a code snippet:
private bool a;
private bool b;
private bool c;
private bool d;
private bool e;
private bool f;
private bool g;
private void Start() {
//How do I call TheMethod() when any 3 of the 7 booleans evaluates to true?
}
private void TheMethod() {
//DO SOMETHING
}
Do I have to create multiple if conditions that checks this?