On Fri, 29 Jun 2012 07:51:32 -0700 (PDT)
Pablo Ramon <19bard...@gmail.com> wrote:

> If my game has a Main menu, level selector, etc... Will I create an 
> activity for any menu, or only one Activity that manage a SurfaceView and 
> helping with "states" Draw the especified menu?

I think this really depends on how you want your menus to look and/or
whether you're familiar with developing using Android widgets. If you
want your game to have its own look & feel and/or you aren't familiar
with widgets it's probably easier to use a single activity and use
similar methods to what your game screen uses to draw things and respond
to input. This is the approach used in the book Beginning Android Games.
The activity owns an object implementing a Screen interface to render
the screen and respond to input, so by replacing the Screen object you
can display all sorts of different screens. I think that's a better
design than having an enum and switch for different states.

If you'd prefer your menu screens to use familiar Android widgets then
use separate activities.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to