This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Building new game, Java 2D question about objects "diappearing"

 
john price
Ranch Hand
Posts: 495
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the most efficient way to have 2D objects "disappear"?
Here is an example:
If block1 is hit, block1hitmarker = true.
Later in code:

Or is there a better way to do this?
Thanks,
cc11rocks
 
Stephan van Hulst
Bartender
Posts: 5334
48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simply don't draw them. What you are doing seems correct, except for some minor issues I have addressed in your other topic.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic