/** * Moves the craft to its destination. */ void Craft::think() { move(); if (reachedDestination() && _dest == (Target*)_base) { setInterceptionOrder(0); checkup(); setDestination(0); setSpeed(0); _lowFuel = false; } }
/** * Moves the craft to its destination. */ void Craft::think() { if (_takeoff == 0) { move(); } else { _takeoff--; } if (reachedDestination() && _dest == (Target*)_base) { setInterceptionOrder(0); checkup(); setDestination(0); setSpeed(0); _lowFuel = false; _mission = false; _takeoff = 0; } }