亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? blockgamemidlet.java

?? J2ME MIDP_Example_Applications
?? JAVA
字號:
// Copyright 2003 Nokia Corporation.
//
// THIS SOURCE CODE IS PROVIDED 'AS IS', WITH NO WARRANTIES WHATSOEVER,
// EXPRESS OR IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY, FITNESS
// FOR ANY PARTICULAR PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE
// OR TRADE PRACTICE, RELATING TO THE SOURCE CODE OR ANY WARRANTY OTHERWISE
// ARISING OUT OF ANY PROPOSAL, SPECIFICATION, OR SAMPLE AND WITH NO
// OBLIGATION OF NOKIA TO PROVIDE THE LICENSEE WITH ANY MAINTENANCE OR
// SUPPORT. FURTHERMORE, NOKIA MAKES NO WARRANTY THAT EXERCISE OF THE
// RIGHTS GRANTED HEREUNDER DOES NOT INFRINGE OR MAY NOT CAUSE INFRINGEMENT
// OF ANY PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OWNED OR CONTROLLED
// BY THIRD PARTIES
//
// Furthermore, information provided in this source code is preliminary,
// and may be changed substantially prior to final release. Nokia Corporation
// retains the right to make changes to this source code at
// any time, without notice. This source code is provided for informational
// purposes only.
//
// Nokia and Nokia Connecting People are registered trademarks of Nokia
// Corporation.
// Java and all Java-based marks are trademarks or registered trademarks of
// Sun Microsystems, Inc.
// Other product and company names mentioned herein may be trademarks or
// trade names of their respective owners.
//
// A non-exclusive, non-transferable, worldwide, limited license is hereby
// granted to the Licensee to download, print, reproduce and modify the
// source code. The licensee has the right to market, sell, distribute and
// make available the source code in original or modified form only when
// incorporated into the programs developed by the Licensee. No other
// license, express or implied, by estoppel or otherwise, to any other
// intellectual property rights is granted herein.


import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;


// BlockGameMIDlet manages which screen is currently displayed.
// The MIDlet screen classes never directly call Display.setCurrent()
// themselves. The UI screens always make callbacks to BlockGameMIDlet
// whenever the displayed screen should be changed. This centralizes
// management of the display resource into a single place
// (class BlockGameMIDlet) in the application code.

public class BlockGameMIDlet
    extends MIDlet
{
    private final Dictionary dictionary;
    private final MainMenu mainMenu;
    private final GameEffects gameEffects;

    private GameManager gameManager = null;
    private SettingsScreen settingsScreen = null;


    public BlockGameMIDlet()
    {
        // The dictionary contains the strings used by the user interface.
        // The dictionary might be configured for internationalization
        // support, based on the values of the microedition.locale
        // and microedition.encoding properties. For this reason, all
        // MIDlet UI screens use the same configured dictionary to get
        // any string values they need.
        dictionary =
            new Dictionary(System.getProperty("microedition.locale"),
                           System.getProperty("microedition.encoding"));

        gameEffects = makeGameEffects();
        mainMenu = new MainMenu(this, dictionary, gameEffects);
    }


    boolean useLimitedFiringRate()
    {
        // The .jad must set the property BlockGame-UseLimitedFiringRate
        // to be "true" to limit the firing rate (e.g. on devices that
        // support multiple key presses). Otherwise an unlimited
        // firing rate is used.

        String property = getAppProperty("BlockGame-UseLimitedFiringRate");
        return (((property != null) && property.equals("true")));
    }


    // MIDlet methods

    public void startApp()
    {
        Displayable current = Display.getDisplay(this).getCurrent();

        if (current == null)
        {
            // Use a splash screen, the first time we are called.
            // The main menu screen will be shown after the splash.
            SplashScreen splashScreen = new SplashScreen(this, mainMenu);

            Display.getDisplay(this).setCurrent(splashScreen);
            splashScreen.start(); // disappear after a fixed time
        }
        else
        {
            Display.getDisplay(this).setCurrent(current);
            if ((gameManager != null) &&
                (current == gameManager.getCanvas()))
            {
                gameManager.resume();
            }
        }
    }


    public void pauseApp()
    {
        if (gameManager != null)
        {
            gameManager.pause();
        }
    }


    public void destroyApp(boolean unconditional)
    {
        if (gameManager!= null)
        {
            gameManager.stop();
        }
    }


    // User Interface screen callbacks


    // GameManager callback

    void gameManagerMainMenu(boolean isGameOver)
    {
        // If the game is over, remove the
        // 'Continue' command from the MainMenu.
        if (isGameOver)
        {
            mainMenu.deleteContinue();
        }
        else
        {
            // highlight 'Continue' in the main menu
            mainMenu.selectContinue();
        }

        Display.getDisplay(this).setCurrent(mainMenu);
    }


    // MainMenu callbacks

    void mainMenuContinue()
    {
        Display.getDisplay(this).setCurrent(gameManager.getCanvas());
    }


    void mainMenuNewGame()
    {
        // gameManager uses the canvas for repaints,
        // determining canvas width, height, etc.
        Canvas closeableCanvas = makeCloseableCanvas();
        gameManager = new GameManager(this, dictionary,
                                      gameEffects, closeableCanvas);
        // The canvas delegates drawing of the game and handling of
        // keyPressed, keyReleased or 'closePressed' events to gameManager.
        ((SettableDelegate)closeableCanvas).setDelegate(gameManager);
        gameManager.start();

        // Set the display to be the game manager's canvas.
        Display.getDisplay(this).setCurrent(closeableCanvas);

        // After the game manager's canvas is displayed and
        // the game is running, the 'Continue' option will be
        // needed from the main menu.
        mainMenu.addContinue();
    }


    void mainMenuSettings()
    {
        if (settingsScreen == null)
        {
            settingsScreen = new SettingsScreen(this, dictionary, mainMenu);
        }
        Display.getDisplay(this).setCurrent(settingsScreen);
    }


    void mainMenuInstructions()
    {
        String title = dictionary.getString(Dictionary.LABEL_INSTRUCTIONS);
        String back = dictionary.getString(Dictionary.LABEL_BACK);
        String text = dictionary.getString(Dictionary.TEXT_INSTRUCTIONS);
        if (useLimitedFiringRate())
        {
            text += dictionary.getString(Dictionary.TEXT_INSTRUCTIONS_GAUGE);
        }
        TextScreen screen = new TextScreen(this, title, text, back);
        Display.getDisplay(this).setCurrent(screen);
    }


    void mainMenuAbout()
    {
        String name = getAppProperty("MIDlet-Name");
        String version = dictionary.getString(Dictionary.LABEL_VERSION) +
                         " " + getAppProperty("MIDlet-Version");
        String vendor = getAppProperty("MIDlet-Vendor");

        String about = name + "\n" + version + "\n" + vendor;
        String title = dictionary.getString(Dictionary.LABEL_ABOUT);
        String back = dictionary.getString(Dictionary.LABEL_BACK);
        TextScreen aboutScreen = new TextScreen(this, title, about, back);
        Display.getDisplay(this).setCurrent(aboutScreen);
    }


    void mainMenuExit()
    {
        destroyApp(false);
        notifyDestroyed();
    }


    // SettingEditor callbacks

    void settingEditorSave(String name, boolean isOn)
    {
        // update game setting and settings screen
        if (name.equals(dictionary.getString(Dictionary.LABEL_VIBRATION)))
        {
            Settings.setUseVibration(isOn);
            settingsScreen.setUseVibration(isOn);
        }
        else if (name.equals(dictionary.getString(Dictionary.LABEL_SOUND)))
        {
            Settings.setUseSound(isOn);
            settingsScreen.setUseSound(isOn);
        }

        Alert confirm = new Alert(null,
            (name + " " + settingsScreen.onOffString(isOn)),
            null, AlertType.INFO); // no title
        confirm.setTimeout(4000); // show Alert for 4 seconds

        Display.getDisplay(this).setCurrent(confirm, settingsScreen);
    }


    void settingEditorBack()
    {
        Display.getDisplay(this).setCurrent(settingsScreen);
    }


    // SettingsScreen callbacks

    void settingsScreenBack(Displayable last)
    {
        settingsScreen = null; // It can be garbage collected now.

        if ((gameManager != null) && (last == gameManager.getCanvas()))
        {
            gameManager.resume();
        }
        Display.getDisplay(this).setCurrent(last);
    }


    void settingsScreenEdit(String name, boolean isOn)
    {
        Display.getDisplay(this).setCurrent(
            new SettingEditor(this, dictionary, name, isOn));
    }


    // SplashScreen callback

    void splashScreenDone(Displayable next)
    {
        Display.getDisplay(this).setCurrent(next);
    }


    // TextScreen callbacks (i.e. About + Instructions)

    void textScreenClosed()
    {
        Display.getDisplay(this).setCurrent(mainMenu);
    }


    // Factory-like methods
    //
    // The Nokia vendor-specific APIs FullCanvas, Sound, and DeviceControl
    // are used if available. If not, use an alternative based on
    // the capabilities of standard MIDP instead.

    private GameEffects makeGameEffects()
    {
        try
        {
            Class.forName("com.nokia.mid.sound.Sound");
            Class.forName("com.nokia.mid.ui.DeviceControl");

            // If no exception was thrown, use the vendor-specific APIs.
            Class clas = Class.forName("NokiaGameEffects");
            return (GameEffects) clas.newInstance();
        }
        catch (Exception e)
        {
            // The vendor-specific APIs are not available,
            // so use the 'stub' GameEffects instead.
            return new GameEffects();
        }
    }


    private Canvas makeCloseableCanvas()
    {
        try
        {
            Class.forName("com.nokia.mid.ui.FullCanvas");

            // If no exception was thrown, use a 'closeable Canvas'
            // based on the vendor-specific FullCanvas class.
            Class clas = Class.forName("NokiaCloseableCanvas");
            return (Canvas) clas.newInstance();
        }
        catch (Exception e)
        {
            // If the vendor-specific FullCanvas API isn't available,
            // use the default CloseableCanvas (derived from Canvas).
            String closeLabel = dictionary.getString(dictionary.LABEL_BACK);
            return new CloseableCanvas(closeLabel);
        }
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
狠狠色狠狠色综合日日91app| 夜夜揉揉日日人人青青一国产精品 | 久久国产精品99精品国产| 99久久99久久精品国产片果冻| 欧美一区二区三区思思人| 亚洲免费观看高清完整版在线 | 一级女性全黄久久生活片免费| 麻豆精品视频在线观看免费| 日本久久电影网| 国产日韩欧美在线一区| 日韩国产欧美视频| 91福利国产成人精品照片| 亚洲国产高清aⅴ视频| 激情久久久久久久久久久久久久久久| 欧美在线一二三四区| 中文字幕一区二区三区四区不卡 | 亚洲男人电影天堂| 国产99一区视频免费| 精品国产1区二区| 日本成人在线电影网| 欧美三级一区二区| 亚洲精品视频一区| av男人天堂一区| 欧美精彩视频一区二区三区| 久久国产综合精品| 91超碰这里只有精品国产| 亚洲综合在线免费观看| 99精品久久99久久久久| 亚洲国产电影在线观看| 国产成人精品亚洲777人妖| 亚洲精品一区二区三区影院| 免费观看成人鲁鲁鲁鲁鲁视频| 欧美日本在线观看| 亚洲国产一区二区视频| 欧美三区在线观看| 亚洲国产日韩一区二区| 欧美在线看片a免费观看| 亚洲美女电影在线| 色呦呦国产精品| 亚洲乱码国产乱码精品精的特点 | 日本丰满少妇一区二区三区| 中文字幕亚洲区| 成人白浆超碰人人人人| 日本一区二区不卡视频| 成人午夜av电影| 国产精品成人一区二区艾草 | 久热成人在线视频| 精品国产一区二区在线观看| 黑人巨大精品欧美一区| 久久综合给合久久狠狠狠97色69| 久久精品噜噜噜成人av农村| www日韩大片| 国产精品一区二区果冻传媒| 国产网站一区二区三区| 成人免费观看男女羞羞视频| 国产精品美女www爽爽爽| 99re成人精品视频| 亚洲一级二级三级| 欧美一级日韩不卡播放免费| 精品在线你懂的| 国产三级一区二区| 91天堂素人约啪| 亚洲国产裸拍裸体视频在线观看乱了 | 91视频在线看| 亚洲一卡二卡三卡四卡五卡| 777午夜精品免费视频| 精品一区二区三区久久久| 国产午夜亚洲精品理论片色戒| 99久久国产免费看| 亚洲成av人片在www色猫咪| 日韩欧美一卡二卡| 成人久久久精品乱码一区二区三区| 亚洲欧洲综合另类在线| 欧美日韩国产另类一区| 久久99国产精品麻豆| 国产精品久久久久久久第一福利| 色综合久久88色综合天天6| 99综合影院在线| 一区二区三区国产精华| 欧美一级久久久久久久大片| 国产成都精品91一区二区三| 一区av在线播放| 久久综合色婷婷| 91麻豆自制传媒国产之光| 青娱乐精品视频| 国产精品久久久久久亚洲伦 | 黄色成人免费在线| 中文字幕亚洲区| 91精品国产综合久久久久久久| 国产一本一道久久香蕉| 亚洲理论在线观看| 日韩精品一区二区三区三区免费 | 福利91精品一区二区三区| 一区二区三区电影在线播| 欧美第一区第二区| 91色综合久久久久婷婷| 精品一区二区三区在线视频| 综合分类小说区另类春色亚洲小说欧美| 欧美日韩精品一区二区三区| 国产黄人亚洲片| 香蕉乱码成人久久天堂爱免费| 2014亚洲片线观看视频免费| 日本韩国精品在线| 国产伦精品一区二区三区免费| 一区二区三区欧美久久| 久久色视频免费观看| 91久久久免费一区二区| 国产aⅴ综合色| 男女激情视频一区| 一区二区在线观看av| 国产亚洲婷婷免费| 666欧美在线视频| 91欧美一区二区| 国产揄拍国内精品对白| 午夜在线成人av| 国产精品理伦片| 日韩欧美在线综合网| 欧美亚洲禁片免费| av综合在线播放| 国产一区 二区 三区一级| 午夜伊人狠狠久久| 亚洲精选免费视频| 中文欧美字幕免费| 精品国产区一区| 欧美精品vⅰdeose4hd| 成人av资源站| 国产一区91精品张津瑜| 免费成人在线影院| 亚洲v精品v日韩v欧美v专区| 亚洲精品乱码久久久久| 国产日韩欧美综合在线| 欧美成人福利视频| 欧美丰满美乳xxx高潮www| 色八戒一区二区三区| 99精品黄色片免费大全| 成人午夜视频福利| 国产成人av在线影院| 国产资源在线一区| 久久电影网站中文字幕 | 一区二区三区在线视频观看| 国产精品女同一区二区三区| 久久一日本道色综合| 欧美大片一区二区三区| 日韩一区二区三区免费看| 在线播放亚洲一区| 欧美日韩电影一区| 欧美日本在线一区| 欧美日韩一区中文字幕| 欧美性色综合网| 欧洲av一区二区嗯嗯嗯啊| 色综合久久久网| 色婷婷国产精品久久包臀 | 国产一区二区影院| 久久精品国产99国产精品| 青草av.久久免费一区| 日韩在线一区二区三区| 日韩国产精品91| 免费人成在线不卡| 久久精品噜噜噜成人av农村| 久久99精品久久久久久久久久久久| 秋霞午夜鲁丝一区二区老狼| 人人精品人人爱| 美女www一区二区| 激情五月播播久久久精品| 国产一区二区美女诱惑| 国产电影一区在线| 99在线精品免费| 色婷婷国产精品久久包臀| 欧美网站一区二区| 欧美精品1区2区| 日韩欧美美女一区二区三区| 久久综合久久99| 国产日韩欧美a| |精品福利一区二区三区| 亚洲伦理在线精品| 日韩精品视频网| 国产一区啦啦啦在线观看| 国产黄色精品视频| 91免费观看国产| 欧美日韩一二区| 日韩女同互慰一区二区| 国产日韩欧美精品综合| 亚洲欧美日韩综合aⅴ视频| 亚洲国产日韩精品| 久草中文综合在线| 高清shemale亚洲人妖| 色综合久久88色综合天天免费| 欧美日韩三级一区二区| 日韩精品中文字幕在线一区| 国产清纯在线一区二区www| 亚洲男同性恋视频| 日本不卡视频在线观看| 丁香桃色午夜亚洲一区二区三区 | 美女网站色91| 成人一区二区三区在线观看| 在线视频综合导航| 日韩美女主播在线视频一区二区三区| 久久久久久久av麻豆果冻| 亚洲欧美色一区| 美国一区二区三区在线播放|