Function that runs the event, checkings its conditions and running its action, then decrementing the run count.
| 64 | // Function that runs the event, checkings its conditions and running its action, then |
| 65 | // decrementing the run count. |
| 66 | bool execute(T *instance) |
| 67 | { |
| 68 | // condition check |
| 69 | if ( !this->isConditionMet(instance) ) |
| 70 | return false; |
| 71 | |
| 72 | // There must be an exec proc! |
| 73 | if ( !this->execProc ) |
| 74 | return false; |
| 75 | |
| 76 | // execute |
| 77 | this->execProc(instance); |
| 78 | |
| 79 | // Decrement run count (-1 being infinite) |
| 80 | if ( this->runCount > 0 ) |
| 81 | --this->runCount; |
| 82 | return true; |
| 83 | }; |
| 84 | |
| 85 | // Function to check if the condition associated with the event is true. Includes frame and |
| 86 | // run count checking. |
nothing calls this directly
no test coverage detected