Libgdx tutorial beginner Part 7 – Adding Hazards

Finally we are going to see some action. We will edit the Map and MapRenderer classes to draw and update the hazards.

  • First we add 3 new Arrays for out hazards.
  • Second we edit the loadBinary method to create and initialize the hazards.
  • Finally we edit the update method and call their update methods.

  • We add 3 new render methods for the hazards
  • then we call them in the render method, notice that renderLaserBeams is called after batch.end, don’t put it between batch.start and batch.end


Recent Posts

Recent Comments

Categories