Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
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
Saloon Keeper
Posts: 7007
110
  • 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.
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!