public void Process() { if (clockBullet.getElapsedTime().asMilliseconds() > 500 && isEnabled()) { guns.get(0).fireBullet(200, getX(), getY() + 20); guns.get(1).fireBullet(150, getX() + 20, getY() + 20); clockBullet.restart(); } }
/** * enable to manage monster actions. * * @param positionCible : monster target position. * @param time : Timer for frames manage. */ public void update(Vector2f positionCible, Time time) { super.update(positionCible, time); if (timerHeal.getElapsedTime().asSeconds() > 5 && life < MAX_LIFE) { life += 1; timerHeal.restart(); } }