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

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

?? sheepdogmidlet.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.// unnamed packageimport javax.microedition.midlet.*;import javax.microedition.lcdui.*;import javax.microedition.rms.*;import java.util.*;import java.io.*;public class SheepdogMIDlet    extends MIDlet    implements Runnable{    private static final String RS_NAME = "BESTTIME";    private MenuList menuList;    private SheepdogCanvas sheepdogCanvas;    private boolean initDone = false;    private static final Random random = new Random();    private boolean hasBestTime = false;    private long bestTime;    public SheepdogMIDlet()    {    }        public void startApp()    {        Displayable current = Display.getDisplay(this).getCurrent();        if (current == null)        {            // first time we've been called            Display.getDisplay(this).setCurrent(new SplashScreen(this));        }        else        {            if (current == sheepdogCanvas)            {                sheepdogCanvas.start();   // start its animation thread            }            Display.getDisplay(this).setCurrent(current);        }    }    public void pauseApp()    {        Displayable current = Display.getDisplay(this).getCurrent();        if (current == sheepdogCanvas)        {            sheepdogCanvas.stop();   // kill its animation thread        }    }    public void destroyApp(boolean unconditional)    {        if (sheepdogCanvas != null)        {            sheepdogCanvas.stop();   // kill its animation thread        }    }    private void quit()    {        destroyApp(false);        notifyDestroyed();    }    public void run()    {        init();    }    private synchronized void init()    {        if (!initDone)        {            readRecordStore();            SoundEffects.getInstance();            menuList = new MenuList(this);            sheepdogCanvas = new SheepdogCanvas(this);            initDone = true;        }    }    void splashScreenPainted()    {        new Thread(this).start();   // start background initialization    }    void splashScreenDone()    {        init();   // if not already done        Display.getDisplay(this).setCurrent(menuList);    }    void menuListContinue()    {        Display.getDisplay(this).setCurrent(sheepdogCanvas);        sheepdogCanvas.start();    }    void menuListNewGame()    {        sheepdogCanvas.init();        Display.getDisplay(this).setCurrent(sheepdogCanvas);        sheepdogCanvas.start();    }    void menuListInstructions()    {        // create and discard a new Instructions screen each time, to        // avoid keeping heap memory for it when it's not in use        Display.getDisplay(this).setCurrent(new InstructionsScreen(this));    }    void menuListHighScore()    {        // create and discard a new High Score screen each time, to        // avoid keeping heap memory for it when it's not in use        Display.getDisplay(this).setCurrent(new HighScoreScreen(this));    }    void menuListQuit()    {        quit();    }    void sheepdogCanvasMenu()    {        sheepdogCanvas.stop();        menuList.setGameActive(true);        Display.getDisplay(this).setCurrent(menuList);    }    void sheepdogCanvasGameOver(long time)    {        sheepdogCanvas.stop();        menuList.setGameActive(false);        Display.getDisplay(this).setCurrent(new GameOverScreen(this, time));    }    void gameOverDone()    {        Display.getDisplay(this).setCurrent(menuList);    }    void instructionsBack()    {        Display.getDisplay(this).setCurrent(menuList);    }    void highScoreBack()    {        Display.getDisplay(this).setCurrent(menuList);    }    // method needed by lots of classes, shared by putting it here    static Image createImage(String filename)    {        Image image = null;        try        {            image = Image.createImage(filename);        }        catch (java.io.IOException ex)        {            // just let return value be null        }        return image;    }    // method needed by lots of classes, shared by putting it here    static int random(int size)    {        return (random.nextInt() & 0x7FFFFFFF) % size;    }    // only the MIDlet has access to the display, so put this method here    void flashBacklight(int millis)    {        Display.getDisplay(this).flashBacklight(millis);    }    // only the MIDlet has access to the display, so put this method here    void vibrate(int millis)    {        Display.getDisplay(this).vibrate(millis);    }    long getBestTime()    {        return hasBestTime ? bestTime : -1;    }    boolean checkBestTime(long time)    {        if (!hasBestTime || (time < bestTime))        {            hasBestTime = true;            bestTime = time;            writeRecordStore();            return true;        }        else        {            return false;        }    }    private void readRecordStore()    {        hasBestTime = false;        RecordStore rs = null;        ByteArrayInputStream bais = null;        DataInputStream dis = null;        try        {            rs = RecordStore.openRecordStore(RS_NAME, false);            byte[] data = rs.getRecord(1);            bais = new ByteArrayInputStream(data);            dis = new DataInputStream(bais);            bestTime = dis.readLong();            hasBestTime = true;        }        catch (IOException ex)        {            // hasBestTime will still be false        }        catch (RecordStoreException ex)        {            // hasBestTime will still be false        }        finally        {            if (dis != null)            {                try                {                    dis.close();                }                catch (IOException ex)                {                    // no error handling necessary here                }            }            if (bais != null)            {                try                {                    bais.close();                }                catch (IOException ex)                {                    // no error handling necessary here                }            }            if (rs != null)            {                try                {                    rs.closeRecordStore();                }                catch (RecordStoreException ex)                {                    // no error handling necessary here                }            }        }    }    // this will only be called when we have a best time    private void writeRecordStore()    {        RecordStore rs = null;        ByteArrayOutputStream baos = null;        DataOutputStream dos = null;        try        {            rs = RecordStore.openRecordStore(RS_NAME, true);            baos = new ByteArrayOutputStream();            dos = new DataOutputStream(baos);            dos.writeLong(bestTime);            byte[] data = baos.toByteArray();            if (rs.getNumRecords() == 0)            {                // new record store                rs.addRecord(data, 0, data.length);            }            else            {                // existing record store: will have one record, id 1                rs.setRecord(1, data, 0, data.length);            }        }        catch (IOException ex)        {            // just leave the best time unrecorded        }        catch (RecordStoreException ex)        {            // just leave the best time unrecorded        }        finally        {            if (dos != null)            {                try                {                    dos.close();                }                catch (IOException ex)                {                    // no error handling necessary here                }            }            if (baos != null)            {                try                {                    baos.close();                }                catch (IOException ex)                {                    // no error handling necessary here                }            }            if (rs != null)            {                try                {                    rs.closeRecordStore();                }                catch (RecordStoreException ex)                {                    // no error handling necessary here                }            }        }    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品亚洲麻豆av一区二区| 色嗨嗨av一区二区三区| 欧美mv日韩mv亚洲| 毛片基地黄久久久久久天堂| 精品伦理精品一区| 国产一区二区网址| 中文字幕不卡一区| 色8久久人人97超碰香蕉987| 午夜欧美大尺度福利影院在线看| 日韩一区二区精品葵司在线 | 国产精品国模大尺度视频| 97精品视频在线观看自产线路二| 亚洲一区在线免费观看| 日韩欧美国产一区在线观看| 国产盗摄精品一区二区三区在线| 中文字幕综合网| 欧美一区二区人人喊爽| 国产一区二区三区精品欧美日韩一区二区三区 | 日韩一区欧美小说| 欧美图片一区二区三区| 精品一区二区三区蜜桃| 亚洲人成小说网站色在线 | 亚洲最快最全在线视频| 欧美精品色综合| 懂色av中文一区二区三区| 亚洲国产综合在线| 国产午夜精品在线观看| 91久久香蕉国产日韩欧美9色| 青青草97国产精品免费观看 | 亚洲大片精品永久免费| 精品免费日韩av| 色综合夜色一区| 美脚の诱脚舐め脚责91| 国产精品无圣光一区二区| 欧美日韩一区二区在线观看视频| 韩国女主播一区二区三区| 依依成人精品视频| 久久精品一区八戒影视| 欧美年轻男男videosbes| 东方aⅴ免费观看久久av| 日韩精品一区第一页| 中文字幕制服丝袜成人av| 欧美一级淫片007| 欧美自拍偷拍午夜视频| 一本色道久久综合亚洲aⅴ蜜桃| 日本大胆欧美人术艺术动态| 国产精品久久久久久一区二区三区| 91精品国产综合久久久久久漫画| 91色|porny| 国产丶欧美丶日本不卡视频| 性做久久久久久免费观看 | 久久亚洲精品小早川怜子| 7777精品伊人久久久大香线蕉的 | 色婷婷激情综合| 东方aⅴ免费观看久久av| 免费美女久久99| 亚洲制服欧美中文字幕中文字幕| 国产目拍亚洲精品99久久精品| 日韩欧美国产三级| 欧美日韩国产经典色站一区二区三区| 国产福利一区二区| 韩国在线一区二区| 日本美女视频一区二区| 亚洲国产精品久久久久秋霞影院| 亚洲视频免费在线观看| 中文字幕一区二区三区精华液| 久久久久久久久久久电影| 日韩欧美另类在线| 91精品国产91久久久久久最新毛片| 一本一道久久a久久精品综合蜜臀| 国产91对白在线观看九色| 国产麻豆成人精品| 国产成人精品亚洲午夜麻豆| 国产原创一区二区| 韩国精品在线观看| 国产一区二区精品在线观看| 国内精品视频一区二区三区八戒| 久88久久88久久久| 精品一区在线看| 国产一区在线视频| 国产福利精品一区| 成人免费视频免费观看| 国产成人一级电影| 成人美女视频在线观看18| 99在线精品视频| 日本国产一区二区| 欧美日韩国产美女| 7777精品伊人久久久大香线蕉完整版| 这里只有精品电影| 精品国产伦一区二区三区免费 | 91免费看`日韩一区二区| 色婷婷激情久久| 欧美日韩亚州综合| 欧美高清视频不卡网| 日韩欧美一级精品久久| 精品久久久久久亚洲综合网| 国产日韩精品一区二区浪潮av| 国产精品天天摸av网| 亚洲激情自拍视频| 丝袜亚洲另类丝袜在线| 蜜桃视频在线一区| 成人黄色软件下载| 欧美做爰猛烈大尺度电影无法无天| 欧美裸体一区二区三区| 精品国产一二三区| 国产精品久久久久桃色tv| 亚洲国产精品久久一线不卡| 麻豆精品久久精品色综合| 高清视频一区二区| 欧洲精品视频在线观看| 日韩欧美高清dvd碟片| 国产精品理论片在线观看| 亚洲一区二区不卡免费| 久久99九九99精品| 99精品久久只有精品| ...xxx性欧美| 亚洲夂夂婷婷色拍ww47| 精品一区二区精品| 99麻豆久久久国产精品免费| 日韩免费视频线观看| 成人免费在线视频| 日本不卡视频在线| 9久草视频在线视频精品| 欧美剧情电影在线观看完整版免费励志电影| 精品日韩99亚洲| 尤物在线观看一区| 国模无码大尺度一区二区三区| 91久久精品网| 欧美国产精品中文字幕| 免费看黄色91| 91美女在线看| 国产视频视频一区| 日韩高清在线电影| 91啪亚洲精品| 亚洲国产成人午夜在线一区| 久久国产婷婷国产香蕉| 在线观看不卡一区| 国产精品久久三| 国产成人自拍网| 欧美刺激脚交jootjob| 亚洲国产一区在线观看| 波多野结衣一区二区三区| 久久免费偷拍视频| 麻豆精品蜜桃视频网站| 欧美猛男男办公室激情| 亚洲精品一二三区| 成人禁用看黄a在线| 久久久久久一级片| 激情六月婷婷久久| 88在线观看91蜜桃国自产| 亚洲永久免费视频| 日本精品一级二级| 亚洲嫩草精品久久| 91亚洲精品久久久蜜桃| 国产免费久久精品| 高清不卡在线观看| 国产丝袜美腿一区二区三区| 韩日精品视频一区| 欧美精品一区二区在线播放| 丝袜亚洲另类欧美综合| 欧美精品成人一区二区三区四区| 亚洲国产视频网站| 欧美日韩三级一区二区| 香蕉成人伊视频在线观看| 欧美浪妇xxxx高跟鞋交| 五月婷婷久久综合| 亚洲欧洲国产日韩| av中文字幕在线不卡| 国产精品不卡视频| 日本韩国视频一区二区| 亚洲精品videosex极品| 在线视频国产一区| 亚洲成人av一区| 91麻豆精品国产91久久久久久久久| 日韩国产高清在线| 日韩精品中文字幕在线一区| 激情综合一区二区三区| 国产三级一区二区三区| 成人国产精品免费网站| 亚洲欧美一区二区三区国产精品 | 国产农村妇女毛片精品久久麻豆| 国产999精品久久久久久绿帽| 日本一区二区免费在线观看视频| 不卡在线视频中文字幕| 亚洲国产视频一区二区| 日韩一二三区视频| 国产高清视频一区| 中文字幕一区不卡| 欧美日韩一本到| 精品亚洲aⅴ乱码一区二区三区| 国产欧美一区二区三区在线老狼 | 国产成人在线免费| 亚洲精品国产无天堂网2021| 欧美日韩激情一区| 国内成+人亚洲+欧美+综合在线| 国产精品美女久久久久久久久久久| 色综合久久久久综合体| 日韩高清在线不卡| 欧美国产97人人爽人人喊| 日本高清成人免费播放|