void cxTimeLine::OnStep(cxFloat dt) { cxFloat elapsed = Elapsed(); for(cxInt i = idx;i<Length();i++){ if(elapsed < times.at(i)){ break; } if(prev == i){ continue; } idx = i; prev = i; OnTime(At(idx)); } cxAction::OnStep(dt); }
void Interface::Step() { if (OnTime() == false) { return; } Update(); switch (direction_) { case 'T': // Send (T)o Send(); break; case 'F': // Receive (F)rom Receive(); break; default: // Undefined direction. break; } }