Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: for Loop for my 2D collision not working??

  1. #1
    Junior Member
    Join Date
    Dec 2009
    Posts
    16
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default for Loop for my 2D collision not working??

    Hey, i'm not sure if the problem is with the for loop or because of my system used for this.... bascily i have a collision thingy that checks if i have touched the floor of my 2d Scroller game. although it only checks w/e is last in the ArrayList, so if i have 5 tiles, it will only detect collision in whicher is last in the arrayList of them, very strange...well here is my code (btw, im adding the Tile class aswell, just incase sum1 thinks the problem is somthing else, and not the loop...)

    Board.class: (the loop/collision stuff)
    Java | package Game; import java - Anonymous - seHtUHvB - Pastebin.com

    Tile.cass: (the tile object thingy majiggy)
    Java | package Game; import java.a - Anonymous - zHDxCBF6 - Pastebin.com

    If anyone can help me out with this...that wuld be awesome!1

    P.S.
    and if anyone would like to earn a "bit" of extra cash, Personal Message me ur msn/Xfire details, later in the week im getting some money in my bank and i can give anyone money that will help me with any problem i encounter, (i will put money on paypal if its needed)

    -thanks!


  2. #2
    Junior Member
    Join Date
    Dec 2009
    Posts
    16
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: for Loop for my 2D collision not working??

    bump----------

Similar Threads

  1. My KeyListener is not Working!!
    By DarrenReeder in forum What's Wrong With My Code?
    Replies: 2
    Last Post: February 28th, 2010, 05:18 PM
  2. Working with MAC .DMG files
    By mdv2000 in forum File I/O & Other I/O Streams
    Replies: 0
    Last Post: January 21st, 2010, 12:31 PM
  3. bounding box collision
    By beechy34 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: January 5th, 2010, 08:58 AM
  4. Replies: 4
    Last Post: January 27th, 2009, 12:03 AM
  5. Comparing hash functions and collision resolutions
    By dansongarcia in forum Collections and Generics
    Replies: 0
    Last Post: November 11th, 2008, 10:50 AM