Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

blahblah_who_cares

  • 3 years ago

Hi. I am creating a game and am new to it. How do I create collision and put in arrays of an object in netbeans?

  • This Question is Closed
  1. KonradZuse
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    Collision detection is done using "intersects." For example Rectangle.intersects(line);

  2. KonradZuse
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    Array of objects is liek any otehr array. Object[] o = new Object[10]; Rectangle[] r = new Rectangle[10];

  3. blahblah_who_cares
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    ok. But what is the [10] mean and after Rectangle[] is the r there because it is what rectangle starts with? @KonradZuse

  4. KonradZuse
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    it seems like you need to learn more about the language itself.. I'm assuming you're using Java With Netbeans? [10] is an array of 10. r is the name of the object... That's basic.

  5. blahblah_who_cares
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    Yes I am pretty new to the language. I just started a couple months ago. Im doing this for a project at school. And yes I am using Java with Netbeans

  6. KonradZuse
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    You can say Rectangle Tuna_Fish_sammich = new Rectangle(); if you wanted...

  7. mominanisar
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    you can get help from video tutorials on http://thenewboston.org/

  8. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy