void FlowerGenerator::update(sf::Time dt) { t+=dt; if ((t >= sf::seconds(getAppConfig()["simulation"]["flower generator"]["delay"].toDouble())) and //vérifie que le temps est écoulé, et que la génération aléatoire est activée (getAppConfig()["simulation"]["flower generator"]["active"].toBool())) { reset(); // remet le compteur à zéro Vec2d p(uniform(0.0, getApp().getWorldSize().x), uniform(0.0, getApp().getWorldSize().y)); getAppEnv().addFlowerAt(p); } }
j::Value const& Bee::getBeeConfig() const { return getAppConfig()["simulation"]["bees"]["generic"]; }
j::Value const& WorkerBee::getConfig() const { return getAppConfig()["simulation"]["bees"]["worker"]; }