Example #1
0
  void SimulaSe(long DiffTime) {

    getMiraAtiva().SimulaSe((int) DiffTime);
    if (!GerenciadorRespawn.isRespawn()) {
      MAPA.Posiciona(
          (int) (heroi.getX() - (GamePanel.PWIDTH / 2)),
          (int) heroi.getY() - (GamePanel.PHEIGHT / 2));
    }

    // MAPA.Posiciona((int)(mousex-(GamePanel.PWIDTH/2)), (int)mousey-(GamePanel.PHEIGHT/2));

    Iterator<Objeto> itO = objetos.iterator();
    while (itO.hasNext()) {
      Objeto inim = itO.next();
      inim.SimulaSe((int) DiffTime);
      if (inim.isVivo() == false) {
        itO.remove();
      }
    }
    base.SimulaSe((int) DiffTime);
    heroi.SimulaSe((int) DiffTime);

    Iterator<Projetil> itP = projeteis.iterator();
    while (itP.hasNext()) {
      Projetil inim = itP.next();
      inim.SimulaSe((int) DiffTime);
      if (inim.isVivo() == false) {
        itP.remove();
      }
    }

    gerenciadorObstaculos.SimulaSe((int) DiffTime);

    gerenciadorDeRaids.SimulaSe((int) DiffTime);

    //		for	(int i=0;i<inimigos.size();i++) {
    ////		Iterator<Inimigo> it = inimigos.iterator();
    ////		while(it.hasNext()){
    ////			Inimigo inim = it.next();
    ////			inim.SimulaSe((int)DiffTime);
    ////			if(inim.isVivo()==false){
    ////				it.remove();
    ////				gerenciadorEfeitos.ganhouXp(inim.getX(), inim.getY(),inim.getTipoAssasino() );
    ////				}
    //			Inimigo inim = inimigos.get(i);
    //			inim.SimulaSe((int)DiffTime);
    //			if(inim.isVivo()==false){
    //				inimigos.remove(i);
    //
    //				inimigos.add(new Inimigo(Constantes.inimigoUm));
    //				inimigos.add(new Inimigo(Constantes.inimigoUm));
    //
    //
    //				gerenciadorEfeitos.ganhouXp(inim.getX(), inim.getY(),inim.getTipoAssasino() );
    //				}
    ////		}
    //		}
    gerenciadorTorre.SimulaSe((int) DiffTime);
    gerenciadorEfeitos.SimulaSe((int) DiffTime);
    gerenciadorRespawn.SimulaSe((int) DiffTime);
    gerenciadorHud.SimulaSe((int) DiffTime);
  }