Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am developing a game that uses different images.When am image is swiped to the bottom of the screen it disappears and a new image appears at the top.Seeing as you can't delete an individual image I want to clear the canvas and redraw the images from an array of images. My question is how do you create an array that is accessible from the onDraw method?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

This sounds like a simple scope issue. One method could be to implement a static management class that is responsible for the images. You could then get the data from this management class at any point in time. This allows you to encapsulate your data, and provide additional methods for manipulating your image data at will.

share|improve this answer
    
Thanks I'll give this a go. –  davemc Feb 5 '13 at 10:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.