⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mygameinterface.java

📁 j2me简单实例,j2me教程加源码,希望大家喜欢
💻 JAVA
📖 第 1 页 / 共 2 页
字号:

  /////////////////////////////////
  /// Ingame text messages      ///
  /////////////////////////////////

  /* menu is aligned to top-right
   * but selector is aligned to left-vcenter
   */
  public static final int MENU_X = SCREEN_WIDTH / 2;
  public static final int MENU_Y = SCREEN_HEIGHT / 3 - 20;
  public static final int MENU_GAP = FONT_HEIGHT + 1;
  public static final int MENU_SELECTOR_X = MENU_X + 5;
  public static final int MENU_SELECTOR_Y = MENU_Y;


  /** 菜单进度条长度 */
  public static final int MENU_SCROLLBAR_LENGTH = 120;


  /** 菜单进度条水平坐标 */
  public static final int MENU_SCROLLBAR_X = SCREEN_WIDTH / 2 + 69;


  /** 菜单进度条上边按钮Y坐标 */
  public static final int MENU_SCROLLBAR_TOP_Y = SCREEN_HEIGHT / 2 - 71;


  /**  菜单进度条下边按钮Y坐标 */
  public static final int MENU_SCROLLBAR_BOTTOM_Y = SCREEN_HEIGHT / 2 + 60;


  /**  菜单进度条相对选择框的偏移 */

  public static final int MENU_SCROLLBAR_CHK = -2 - (220 - SCREEN_HEIGHT) / 4;

  
  //#if ENGLISH
                /////////////////////////////////
                /// Ingame text messages      ///
                /////////////////////////////////
                /* general */
                /////////////////////////////////
                /// Ingame text messages      ///
                /////////////////////////////////
                /* general */
                public static final String MSG_BACK             ="Back";
                public static final String MSG_PRESSANYKEY 	= "Press Any Key";

                /* Main Menu */
                public static final String[] MENU_MAIN = {"Start", "Options", "Manual", "About",  "Exit"};

                /* Menu  Game*/
                public static final String[] MENU_GAME =  {"New Game", "Load", "Back" };

                /* game options */
                public static final String[] MENU_OPTIONS = {"Sound On", "Sound Off", "Back" };

                /* difficulty */
                public static final String[] MENU_DIFFICULTY = {"Level Hard", "Level Normal", " Level Easy", "Back"};

                /* sound */
                public static final String[] MENU_SOUND = {"Sound On", "Sound Off", "Back"};


                /* hiscore messages */
                public static final String MSG_HISCOREGREET 	= " You have HiScore!";
                public static final String MSG_CLEAR 		= "Clear";
                public static final String MSG_ACCEPT	 	= "OK";



                /* game pause */
                public static final String[] MENU_GAME_PAUSE = { "Save"," Resume", "Back Mainmenu" };

                public static final String MSG_SAVING = "Saved";

               /** 载入游戏关于字幕  load credits names */
                public static final String [][] CREDITS = {
                        {"Engine", "Yuzhe Sun"},
                        {"Game Design", " Qiangzi Diao "},
                        {"Art work", "Aiping Zhao"},
                        {"Coding", " Ran Li ", "syz"},
                        {"Animation Design", "Yu Cai"}
                        };
                
  /*每一关的名字*/
  public static final String[] EVERYSCREENNAME = {
                                                 "DESERT", "LANE", "CITY", "SEASHORE",
                                                 "HILL", "PARIS"};     
  
  public static final String [] HINT= {"You failed, try again!", 
  "Points not enough!", "Well done! try next!", "Congratulations!", 
  "\"2\"or\"up\":jump", "\"5\"or\"OK\":hit", "\"8\"or\"down\":squat", 
  "loading...", "back", "challenger:", "you need get", " points", "please wait" };  

//#else
//# 
//#   /** general */
//#   public static final String MSG_PRESSANYKEY = "按任意键继续";
//# 
//# 
//#   /** Main Menu */
//#   public static final String[] MENU_MAIN = {"开始", "设置", "帮助", "关于", "退出"};
//# 
//# 
//#   /** Menu  Game*/
//#   public static final String[] MENU_GAME = {"新游戏", "载入", "返回"};
//# 
//# 
//#   /** Menu Option*/
//#   public static final String[] MENU_OPTIONS = {"声音 开", "声音 关", "返回"};
//# 
//# 
//#   /** sound */
//#   public static final String[] MENU_SOUND = {"声音 开", "声音 关", "返回"};
//# 
//# 
//#   /** pop */
//#   public static final String[] MENU_GAME_PAUSE = {"保存", "继续", "返回主菜单"};
//# 
//#   public static final String MSG_SAVING = "保存完毕";
//#   
//#   /*每一关的名字*/
//#   public static final String[] EVERYSCREENNAME = {
//#                                                  "沙漠之旅", "乡间小路", "幽夜城市", "夕阳海滩",
//#                                                  "群山石林", "决战巴黎"};  
//#   
//# //  /** 载入游戏关于字幕  load credits names */
//#   public static final String[][] CREDITS = { {"引擎设计", "孙宇哲"}
//#                                            , {"策划", "刁子强"}
//#                                            , {"美工", "赵爱萍"}
//#                                            , {"程序", "李然"}
//#                                            , {"动画编辑器设计", "蔡宇"}
//#                                            , {"Email", "sunyuzhe@hotmail.com"}
//#   };  
//#   /** 载入游戏关于字幕  load credits names */
//#  
//#   public static final String [] HINT= {"挑战失败,再来过!", 
//#   "分数不够,再试一次!", "恭喜挑战成功!", "恭喜您获得冠军!", 
//#   "\"2\"或\"上\"键:向上跳", "\"5\"或\"OK\"键:击打", "\"8\"或\"下\"键:下蹲", 
//#   "读取游戏...", "返回", "挑战者:", "获胜条件", "分", "请稍等"};
//#   
  //#endif

  public static final String MSG_LOADNAME = "GAMEFRAMEWORK2";

  //奖品栏的位置
  public static final int BONUS_SHELF = 80;

  //工具栏的位置
  public static final int TOOL_SHELF = 111;


  /*---------------------------------------*
   * Game colors configuration             *
   *---------------------------------------*/
  /* default colors */
  public static final int COLOR_RED = 0xe00000;
  public static final int COLOR_GREEN = 0x00e000;
  public static final int COLOR_BLUE = 0x0000e0;
  public static final int COLOR_WHITE = 0xe0e0e0;
  public static final int COLOR_GRAY = 0x404040;
  public static final int COLOR_BLACK = 0x000000;
  public static final int COLOR_YELLOW = 0xffaa00;


  /* schema colors */
  public static final int COLOR_ACTIVE = COLOR_WHITE;
  public static final int COLOR_INACTIVE = COLOR_GRAY;
  public static final int COLOR_ENABLED = COLOR_GREEN;
  public static final int COLOR_DISABLED = COLOR_INACTIVE;


  /* menu font style */
  public static final int MENUFONT_FACE = Font.FACE_PROPORTIONAL;
  public static final int MENUFONT_STYLE = Font.STYLE_BOLD;
  public static final int MENUFONT_SIZE = Font.SIZE_MEDIUM;

  public static final int PRESSANYKEY_FACE = Font.FACE_PROPORTIONAL;
  public static final int PRESSANYKEY_STYLE = Font.STYLE_BOLD;
  public static final int PRESSANYKEY_SIZE = Font.SIZE_SMALL;

  public static final int HELPFONT_FACE = Font.FACE_PROPORTIONAL;
  public static final int HELPFONT_STYLE = Font.STYLE_BOLD;
  public static final int HELPFONT_SIZE = Font.SIZE_SMALL;

  public static final int HISCOREFONT_FACE = Font.FACE_PROPORTIONAL;
  public static final int HISCOREFONT_STYLE = Font.STYLE_BOLD;
  public static final int HISCOREFONT_SIZE = Font.SIZE_MEDIUM;

  public static final int CREDITSFONT_FACE = Font.FACE_PROPORTIONAL;
  public static final int CREDITSFONT_STYLE = Font.STYLE_BOLD;
  public static final int CREDITSFONT_SIZE = Font.SIZE_LARGE;


  /*---------------------------------------*
   * HelpState configuration               *
   *---------------------------------------*/
  /* help is aligned to top-left
   * and scroller is aligned to (top) bottom-hcenter
   * and the second one (bottom) to top-hcenter, and the
   * vertical distance between them is: HELP_SCROLL_LEN
   */
  //#if (SE_K700||MOTO_V600||NOKIA_S60_V1||NOKIA_S60_V2||MOTO_E398||MOTO_E680||SAMSUNG_D508)
  public static final int HELP_LINES = 6;
  //#else
//#   public static final int HELP_LINES = SCREEN_HEIGHT / 25;
  //#endif
  
  //#if MOTO_E680
//#   public static final int HELP_X = (SCREEN_WIDTH - 176) / 2 + 25;
//#   public static final int HELP_Y = ((SCREEN_HEIGHT - 220) / 2 + 220) / 4 + 5;
//#   public static final int HELP_GAP = MENU_GAP;
//#   public static final int HELP_LINE_LEN = SCREEN_WIDTH - 2 * HELP_X;
//#   public static final int HELP_SCROLL_X = ((SCREEN_WIDTH - 176) / 2 + 176) / 2;
//#   public static final int HELP_SCROLL_Y = HELP_Y - 10;
//#   public static final int HELP_SCROLL_LEN = HELP_GAP * HELP_LINES + 10;
//#   /* status messages are aligned to left & right and bottom  */
//#   public static final int HELP_BACK_X = (SCREEN_WIDTH - 176) / 2 + 176 - 10;
//#   public static final int HELP_BACK_Y = (SCREEN_HEIGHT - 220) / 2 + 220 - 4;   
  //#else
  public static final int HELP_X = 25;
  public static final int HELP_Y = SCREEN_HEIGHT / 4 + 5;
  public static final int HELP_GAP = MENU_GAP;
  public static final int HELP_LINE_LEN = SCREEN_WIDTH - 2 * HELP_X;
  public static final int HELP_SCROLL_X = SCREEN_WIDTH / 2;
  public static final int HELP_SCROLL_Y = HELP_Y - 10;
  public static final int HELP_SCROLL_LEN = HELP_GAP * HELP_LINES + 10;
  /* status messages are aligned to left & right and bottom  */
  public static final int HELP_BACK_X = SCREEN_WIDTH - 10;
  public static final int HELP_BACK_Y = SCREEN_HEIGHT - 4;    
  //#endif
  
  
  /*---------------------------------------*
   * CreditsState configuration            *
   *---------------------------------------*/
  /* credits board is aligned to hcenter and vcenter */
  public static final int CREDITS_BOARD_X = SCREEN_WIDTH / 2;
  public static final int CREDITS_BOARD_Y = SCREEN_HEIGHT / 2;


  /* painted text aligned to hcenter and vcenter */
  public static final int CREDITS_TEXT_X = SCREEN_WIDTH / 2;
  public static final int CREDITS_TEXT_Y = SCREEN_HEIGHT / 2;
  public static final int CREDITS_TEXT_GAP = MENU_GAP;


  /* pressanykey is aligned to bottom-center_x */
  public static int PRESSANYKEY_Y = SCREEN_HEIGHT - SCREEN_HEIGHT / 30;


  /* ingame resources constraints */
  public static final String RES_HELP = RES_PATH + "help.txt";




  public static final String SOUND_NAMES[] = {"sound_0.mid", "sound_1.mid",
                                             "sound_2.mid", "sound_3.mid",
                                             "sound_4.mid"};

  public static final int SOUND_BACKGROUND = 0;
  public static final int SOUND_LOADING = 1;
  public static final int ALL_SOUNDS = 99;


  /*---------------------------------------*
   * SaveResume configuration              *
   *---------------------------------------*/
  public static final int SAVERESUME_GAP = SCREEN_HEIGHT / 8;
  public static final int SAVERESUME_SELECTOR_W = SCREEN_WIDTH -
                                                  2 * SCREEN_WIDTH / 8;

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -