/** * Update all things up to the given time. * @param float $time */ public function update($time) { // update resources $this->income->update($time); // update hatcheries $this->hatcheries->update($time); // update spellcasters $this->spellcasters->update($time); // update production queues $this->queues->update($time); }
} } $options = $parsedOptions; // anchor $anchor = "./?buildOrder=" . urlencode(_GET("buildOrder")); echo "<p>Copy <a href=\"" . $anchor . "\" target=\"_blank\">link to this build</a> to share with friends.</p>"; // initialize timeline $timeline = new Timeline($race); $timeline->startupBuildDelay = $parsedOptions["Startup Build Delay"]; sort($checkpoints); foreach ($checkpoints as $checkpoint) { $timeline->checkpoints[] = new Checkpoint("Checkpoint", $checkpoint); } $timeline->debug = (bool) ($debugFlags & 1); ProductionQueues::$debug = (bool) ($debugFlags & ProductionQueues::debugFlag); Spellcasters::$debug = (bool) ($debugFlags & Spellcasters::debugFlag); // initial income $timeline->income = new IncomeSlots(50, 0); $timeline->income->debug = (bool) ($debugFlags & 2); if ($options["Startup Mining Delay"] > 0) { $income = new IncomeSlot(0, $options["Startup Mining Delay"]); $income->mineralMiners = array(); $timeline->income[] = $income; $income = new IncomeSlot($options["Startup Mining Delay"]); $income->mineralMiners = array(6); $income->basesOperational = array(true); $timeline->income[] = $income; } else { $income = new IncomeSlot(); $income->mineralMiners = array(6); $income->basesOperational = array(true);