Search:

Type: Posts; User: Norm

Search: Search took 0.15 seconds.

  1. Replies
    22
    Views
    2,369

    [SOLVED] Re: Help Generating a level

    The problem is where you are using an instance of the Cobblestone class in the drawImage() method. That is where you need to call the Cobblestone class's getImage() method.
    Look at where you are...
  2. Replies
    22
    Views
    2,369

    [SOLVED] Re: Help Generating a level

    Can you explain why you call the getImage() method of the Person class, but won't call the getImage() method of the Cobblestone class?
  3. Replies
    22
    Views
    2,369

    [SOLVED] Re: Help Generating a level

    Where do you call the Cobblestone class's getImage() method?
  4. Replies
    22
    Views
    2,369

    [SOLVED] Re: Help Generating a level

    m.drawImage(person.getImage(), person.getX(), person.getY(), this);
    Is this where the image is being drawn?
  5. Replies
    22
    Views
    2,369

    [SOLVED] Re: Help Generating a level

    That could be very hard. You would need to define the methods in the Image class.
    Why do you want to make it an Image? Where do you want to use instances of the class that absolutely require it to...
  6. Replies
    22
    Views
    2,369

    [SOLVED] Re: Help Generating a level

    The compiler wants you to code a variable name in the Graphics class's drawImage() method that has a data type of Image. Cobblestone is NOT an Image. IThe Cobblestone class has a getImage() method...
  7. Replies
    22
    Views
    2,369

    [SOLVED] Re: Help Generating a level

    Is g2 a Graphics object?
    If it is, then is cobblestone an Image object? It must be, the drawImage() method requires an Image.
    Replace cobblestone with a reference to an Image object.

    Where is...
  8. Replies
    22
    Views
    2,369

    [SOLVED] Re: Help Generating a level

    Please post the full text of the error message and the source code causing it.

    The Graphics class's drawImage() requires an Image, not a Cobblestone object.
  9. Replies
    22
    Views
    2,369

    [SOLVED] Re: Help Generating a level

    The compiler is looking for an Image as the first argument to drawImage(). It is finding a Cobblestone object which is not an Image.
    Does the Cobblestone class have a method that returns an Image?...
Results 1 to 9 of 9