예제 #1
0
 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();
   }
 }
예제 #2
0
 /**
  * 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();
   }
 }