示例#1
0
void CSuperTask::Update()
{
    CCircuitAI* circuit = manager->GetCircuit();
    int frame = circuit->GetLastFrame();
    CCircuitUnit* unit = *units.begin();
    CCircuitDef* cdef = unit->GetCircuitDef();
    if (cdef->IsHoldFire()) {
        if (targetFrame + (cdef->GetReloadTime() + TARGET_DELAY) > frame) {
            if ((State::ENGAGE == state) && (targetFrame + TARGET_DELAY <= frame)) {
                TRY_UNIT(circuit, unit,
                         unit->GetUnit()->Stop();
                        )
                state = State::ROAM;
            }
            return;
        }