📄 gameplay.java~1~
字号:
package GoGoGo;import java.util.Vector;/** * <p>Title: </p> * <p>Description: </p> * <p>Copyright: Copyright (c) 2003</p> * <p>Company: </p> * @author not attributable * @version 1.0.0 */public class GamePlay extends GameFrameBase{ //Game State Defining final static byte PLAYS_NEXT_LEVEL = 20; final static byte PLAYS_COUNT_DOWN = 21; final static byte PLAYS_PLAYING = 22; final static byte PLAYS_STAGE_CLEARED = 23; final static byte PLAYS_BOOM = 24; final static byte PLAYS_GAME_OVER = 25; CMap m_Map=null; //Game map Defining /* final static byte STAGE_DATA[][][] = { { {2, 0, 0, 4, 0}, {0, 0, 3, 0, 4}, {1, 0, 2, 0, 0}, {0, 0, 0, 0, 0} } };*/ //Gaming Consts /* final static byte STAGE_COUNT = 1; final static byte BLOCK_SIZE = 24; final static byte SMALL_BLOCK_SIZE = 16; final static byte MAP_X_LENGTH = 5; final static byte MAP_Y_LENGTH = 4; final static byte START_POS_X = 4; final static byte START_POS_Y = 1;*/ //=变量定义================= //byte m_Curr_StageData[][]; int m_i_CurrStage; //==================================END= //=图片资源================= private Surface m_Surface_BigRoad = null; private Surface m_Surface_BigCar = null; private Surface m_Surface_SmallRoad = null; private Surface m_Surface_SmallCar = null; private Surface m_Surface_Icons = null; private Surface m_Surface_Digits = null; private Surface m_Surface_Boom = null; private Surface m_Surface_TitleNext = null; private Surface m_Surface_TitleGameOver = null; //==================================END= public GamePlay() { m_vect_SurfacePath = new Vector(); m_vect_SurfacePath.addElement("/map3.png"); m_vect_SurfacePath.addElement("/man1.png"); m_vect_SurfacePath.addElement("/smallroad.png"); m_vect_SurfacePath.addElement("/smallcar.png"); m_vect_SurfacePath.addElement("/icons.png"); m_vect_SurfacePath.addElement("/digits.png"); m_vect_SurfacePath.addElement("/boom.png"); m_vect_SurfacePath.addElement("/title_next.png"); m_vect_SurfacePath.addElement("/title_gameover.png"); // m_Curr_StageData = new byte[MAP_Y_LENGTH][MAP_X_LENGTH]; } public void Create(GameViewBase view) { m_View = view; m_BackGraphy = m_View.m_g_BackGraphy; m_Surface_BigRoad = m_View.nextSurface(); m_Surface_BigCar = m_View.nextSurface(); m_Surface_SmallRoad = m_View.nextSurface(); m_Surface_SmallCar = m_View.nextSurface(); m_Surface_Icons = m_View.nextSurface(); m_Surface_Digits = m_View.nextSurface(); m_Surface_Boom = m_View.nextSurface(); m_Surface_TitleNext = m_View.nextSurface(); m_Surface_TitleGameOver = m_View.nextSurface(); if( m_Map == null) { m_Map = new CMap(m_View); m_Map.Create(m_Surface_BigRoad) ; } } public void Release() { if(m_View != null) m_View.ReleaseAllSurfaces(); } public void NewGame(int iStage) { m_i_CurrStage = iStage; //加载资源 } public void OnKeyDown(int iScanCode) { switch (m_i_FrameState) { } } public void OnKeyUp(int iScanCode) { } public void Show() { switch (m_i_FrameState) { } m_Map.DRAWMAP(); } public void GotoGameOver() { m_View.m_pge_gamerank.GotoGameRank(m_i_CurrStage); m_View.m_pge_gameswitch.SwitchFrame(this, m_View.m_pge_gamerank); } private void DrawGameOver() { } //============================================END=}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -