14.06.2011

GameThread Attributes

posted by Karsten

//Different mMode states public static final int STATE_LOSE = 1; public static final int STATE_PAUSE = 2; public static final int STATE_READY = 3; public static final int STATE_RUNNING = 4; public static final int STATE_WIN = 5; //Control variable for the mode of the game (e.g. STATE_WIN) private int mMode = 1; //Control of the actual running inside run() private boolean mRun = false; //The surface this thread (and only this thread) writes upon private SurfaceHolder mSurfaceHolder; //the message handler to the View/Activity thread private Handler mHandler; //Android Context - this stores almost all we need to know private Context mContext; //The view public GameView mGameView; //We might want to extend this call - therefore protected protected int mCanvasWidth = 1; protected int mCanvasHeight = 1; //Last time we updated the game physics protected long mLastTime = 0; protected Bitmap mBackgroundImage; private long score = 0; //All *WE* need for sprite, but in a real game....... private Bitmap mBall; private float mBallX = 0; private float mBallY = 0; private float mBallDX = 0; private float mBallDY = 0;

Share

Place your comment

Please fill your data and comment below.
Name
Email
Website
Your comment