Results 1 to 4 of 4
  1. #1
    Scyth3 is offline Member
    Join Date
    Nov 2012
    Posts
    12
    Rep Power
    0

    Unhappy Hard to explain, see topic (Sorry)

    Hard to explain, see topic (Sorry)-clip0001.jpg

    I want to make it so when the bike touches the block, game over. I can handle the game over part, but I don't know how to handle the two JLabels touching. Any ideas? Thanks

    BTW, the block scrolls across the screen, and the bike can jump

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default Re: Hard to explain, see topic (Sorry)

    Your program should have a logic portion and a GUI portion, and possibly a control portion that connects the two. The code that checks for collisions should be in the logic portion and should have no GUI code in it at all. A simple if block would be adequate for testing for collision, perhaps with a for loop if you're testing for collision of multiple entities.

  3. #3
    Scyth3 is offline Member
    Join Date
    Nov 2012
    Posts
    12
    Rep Power
    0

    Default Re: Hard to explain, see topic (Sorry)

    Quote Originally Posted by Fubarable View Post
    Your program should have a logic portion and a GUI portion, and possibly a control portion that connects the two. The code that checks for collisions should be in the logic portion and should have no GUI code in it at all. A simple if block would be adequate for testing for collision, perhaps with a for loop if you're testing for collision of multiple entities.
    I don't know how to check for collision

  4. #4
    Scyth3 is offline Member
    Join Date
    Nov 2012
    Posts
    12
    Rep Power
    0

    Default Re: Hard to explain, see topic (Sorry)

    Nevermind, got it. Thanks for the help

Similar Threads

  1. Replies: 8
    Last Post: 01-10-2012, 05:40 AM
  2. Replies: 2
    Last Post: 12-13-2010, 02:34 PM
  3. Replies: 3
    Last Post: 12-13-2010, 08:22 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •