Пример #1
0
  public Obj_Bonus_c addBonus(float x, float y) {

    Obj_Bonus_c bonus = new Obj_Bonus_c();

    map_m.addObjets(bonus, x, y);

    return bonus;
  }
Пример #2
0
  public Obj_Bombe_c addBombe(Obj_Player_c obj_player_c, float x, float y) {

    Obj_Bombe_c bombe = new Obj_Bombe_c(obj_player_c, this);

    map_m.addObjets(bombe, x, y);

    return bombe;
  }
Пример #3
0
  public void createObjectsMap() {

    // Ajout des objets

    for (int i = 0; i < Game_c.TAILLE_MAP; i++) {
      for (int j = 0; j < Game_c.TAILLE_MAP; j++) {

        map_m.videTab(i, j);

        if (j == 0 || i == 0 || i == Game_c.TAILLE_MAP - 1 || j == Game_c.TAILLE_MAP - 1)
          map_m.addObjets(new Obj_Bloc_indestructible_c(), i * 32.f, j * 32.f);
        else if (i % 2 == 0 && j % 2 == 0)
          map_m.addObjets(new Obj_Bloc_indestructible_c(), i * 32.f, j * 32.f);
        else if (blocIsPlacable(i, j))
          map_m.addObjets(new Obj_Bloc_destructible_c(), i * 32.f, j * 32.f);
      }
    }
  }
Пример #4
0
  public Obj_Feu_c addFeu(float x, float y) {

    Obj_Feu_c feu = new Obj_Feu_c(this);

    map_m.addObjets(feu, x, y);

    game_c.checkCollisionExplosion(feu);

    return feu;
  }