Quantcast

A community for students. Sign up today!

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

blahblah_who_cares

  • one year 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
    • one year 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
    • one year 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
    • one year 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
    • one year 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
    • one year 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
    • one year 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
    • one year 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.

    Search OpenStudy
    • Attachments:

Ask your own question

Ask a Question
Find more explanations on OpenStudy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.