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

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? gamecanvas.java

?? 這是j2me里MIDP2.0中g(shù)ame包的源代碼
?? JAVA
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
/* * @(#)GameCanvas.java	1.39 02/10/11 @(#) * * Copyright (c) 2002 Sun Microsystems, Inc.  All rights reserved. * PROPRIETARY/CONFIDENTIAL * Use is subject to license terms. */package javax.microedition.lcdui.game;import javax.microedition.lcdui.Image;import javax.microedition.lcdui.Graphics;import javax.microedition.lcdui.Canvas;import com.sun.midp.lcdui.DisplayAccess;import com.sun.midp.lcdui.GameMap;/** * The GameCanvas class provides the basis for a game user interface.  In * addition to the features inherited from Canvas (commands, input events, * etc.) it also provides game-specific capabilities such as an * off-screen graphics buffer and the ability to query key status. * <p> * A dedicated buffer is created for each GameCanvas instance.  Since a * unique buffer is provided for each GameCanvas instance, it is preferable * to re-use a single GameCanvas instance in the interests of minimizing * heap usage.  The developer can assume that the contents of this buffer * are modified only by calls to the Graphics object(s) obtained from the * GameCanvas instance; the contents are not modified by external sources * such as other MIDlets or system-level notifications.  The buffer is * initially filled with white pixels. * <p> * The buffer's size is set to the maximum dimensions of the GameCanvas. * However, the area that may be flushed is limited by the current * dimensions of the GameCanvas (as influenced by the presence of a Ticker, * Commands, etc.) when the flush is requested.  The current dimensions of * the GameCanvas may be obtained by calling * {@link javax.microedition.lcdui.Canvas#getWidth getWidth} and * {@link javax.microedition.lcdui.Canvas#getHeight getHeight}. * <p> * A game may provide its own thread to run the game loop.  A typical loop * will check for input, implement the game logic, and then render the updated * user interface. The following code illustrates the structure of a typcial * game loop: <code> * <pre> * // Get the Graphics object for the off-screen buffer * Graphics g = getGraphics(); * * while (true) { *      // Check user input and update positions if necessary *      int keyState = getKeyStates(); *      if ((keyState & LEFT_PRESSED) != 0) { *          sprite.move(-1, 0); *      } *      else if ((keyState & RIGHT_PRESSED) != 0) { *          sprite.move(1, 0); *      } * *	// Clear the background to white *	g.setColor(0xFFFFFF); *	g.fillRect(0,0,getWidth(), getHeight()); * *      // Draw the Sprite *      sprite.paint(g); * *      // Flush the off-screen buffer *      flushGraphics(); * } * </pre> * </code> * <P> * @since MIDP 2.0 **/public abstract class GameCanvas extends Canvas{    /**     * The bit representing the UP key.  This constant has a value of      * <code>0x0002</code> (1 << Canvas.UP).     */    public static final int UP_PRESSED = 1 << Canvas.UP;        /**     * The bit representing the DOWN key.  This constant has a value of      * <code>0x0040</code> (1 << Canvas.DOWN).     */    public static final int DOWN_PRESSED = 1 << Canvas.DOWN;    /**     * The bit representing the LEFT key.  This constant has a value of      * <code>0x0004</code> (1 << Canvas.LEFT).     */    public static final int LEFT_PRESSED = 1 << Canvas.LEFT;    /**     * The bit representing the RIGHT key.  This constant has a value of      * <code>0x0020</code> (1 << Canvas.RIGHT).     */    public static final int RIGHT_PRESSED = 1 << Canvas.RIGHT;    /**     * The bit representing the FIRE key.  This constant has a value of      * <code>0x0100</code> (1 << Canvas.FIRE).     */    public static final int FIRE_PRESSED = 1 << Canvas.FIRE;    /**     * The bit representing the GAME_A key (may not be supported on all      * devices).  This constant has a value of      * <code>0x0200</code> (1 << Canvas.GAME_A).     */    public static final int GAME_A_PRESSED = 1 << Canvas.GAME_A;    /**     * The bit representing the GAME_B key (may not be supported on all      * devices).  This constant has a value of      * <code>0x0400</code> (1 << Canvas.GAME_B).     */    public static final int GAME_B_PRESSED = 1 << Canvas.GAME_B;    /**     * The bit representing the GAME_C key (may not be supported on all      * devices).  This constant has a value of      * <code>0x0800</code> (1 << Canvas.GAME_C).     */    public static final int GAME_C_PRESSED = 1 << Canvas.GAME_C;    /**     * The bit representing the GAME_D key (may not be supported on all      * devices).  This constant has a value of      * <code>0x1000</code> (1 << Canvas.GAME_D).     */    public static final int GAME_D_PRESSED = 1 << Canvas.GAME_D;    /**     * Height available to draw on in full screen mode.     *     */    private static final int FULLSCREEN_HEIGHT;    /**     * Width available to draw on in full screen mode.     *     */    private static final int FULLSCREEN_WIDTH;    /**      * currently every GameCanvas has one offscreen buffer     * can be optimized so that we put a limit on no of offscreen buffers     * an application can have     */    private Image offscreen_buffer;    /**     * Creates a new instance of a GameCanvas.  A new buffer is also created     * for the GameCanvas and is initially filled with white pixels.     * <p>     * If the developer only needs to query key status using the getKeyStates     * method, the regular key event mechanism can be suppressed for game keys     * while this GameCanvas is shown.  If not needed by the application, the      * suppression of key events may improve performance by eliminating      * unnecessary system calls to keyPressed, keyRepeated and keyReleased      * methods.      * <p>     * If requested, key event suppression for a given GameCanvas is started      * when it is shown (i.e. when showNotify is called) and stopped when it     * is hidden (i.e. when hideNotify is called).  Since the showing and      * hiding of screens is serialized with the event queue, this arrangement     * ensures that the suppression effects only those key events intended for     * the corresponding GameCanvas.  Thus, if key events are being generated     * while another screen is still shown, those key events will continue to     * be queued and dispatched until that screen is hidden and the GameCanvas     * has replaced it.     * <p>     * Note that key events can be suppressed only for the defined game keys      * (UP, DOWN, FIRE, etc.); key events are always generated for all other      * keys.       * <p>     * @param suppressKeyEvents <code>true</code> to suppress the regular     * key event mechanism for game keys, otherwise <code>false</code>.     */    protected GameCanvas(boolean suppressKeyEvents) {	// Create and offscreen Image object that 	// acts as the offscreen buffer to which we draw to.	// the contents of this buffer are flushed to the display         // only when flushGraphics() has been called.	offscreen_buffer = 	    Image.createImage(FULLSCREEN_WIDTH, FULLSCREEN_HEIGHT);	setSuppressKeyEvents((Canvas)this, suppressKeyEvents);    }        /**     * Obtains the Graphics object for rendering a GameCanvas.  The returned      * Graphics object renders to the off-screen buffer belonging to this      * GameCanvas.     * <p>	      * Rendering operations do not appear on the display until flushGraphics()     * is called; flushing the buffer does not change its contents (the pixels     * are not cleared as a result of the flushing operation).     * <p>     * A new Graphics object is created and returned each time this method is     * called; therefore, the needed Graphics object(s) should be obtained      * before the game starts then re-used while the game is running.       * For each GameCanvas instance, all of the provided graphics objects will     * render to the same off-screen buffer.      * <P>

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品视频在线视频| 精品日韩在线观看| 精品精品国产高清a毛片牛牛 | 中文字幕亚洲视频| 麻豆视频观看网址久久| 91免费精品国自产拍在线不卡| 日韩情涩欧美日韩视频| 亚洲国产精品欧美一二99| 成人v精品蜜桃久久一区| 精品国产精品一区二区夜夜嗨| 夜夜嗨av一区二区三区| 成人h版在线观看| 久久婷婷久久一区二区三区| 日韩高清中文字幕一区| 色老汉一区二区三区| 国产精品久久影院| 国产夫妻精品视频| 久久午夜羞羞影院免费观看| 美女精品自拍一二三四| 欧美精品一卡二卡| 婷婷开心久久网| 在线观看亚洲精品| 一区二区三区视频在线观看| 91在线云播放| 亚洲摸摸操操av| 91免费看`日韩一区二区| 亚洲视频一区二区在线| 99精品国产视频| 国产精品国产三级国产aⅴ中文| 国产精品91一区二区| 精品sm捆绑视频| 国产福利一区二区三区视频在线 | 欧美日韩国产综合视频在线观看| 亚洲欧洲精品成人久久奇米网| 国产一区二区按摩在线观看| 久久久久88色偷偷免费| 国产精品自拍av| 国产人伦精品一区二区| 成人av午夜电影| 亚洲乱码精品一二三四区日韩在线| av毛片久久久久**hd| 亚洲欧洲av另类| 色综合色狠狠综合色| 亚洲国产视频一区| 欧美日韩的一区二区| 蜜臀久久久99精品久久久久久| 欧美一二三四区在线| 国产九色精品成人porny| 日本一区二区视频在线观看| av在线播放成人| 亚洲午夜久久久久中文字幕久| 欧美绝品在线观看成人午夜影视| 日本三级亚洲精品| 久久青草国产手机看片福利盒子 | 蜜臀av一区二区| 国产拍揄自揄精品视频麻豆| 国产成人亚洲综合a∨婷婷| 中文字幕第一区| 欧美亚洲高清一区| 久久爱另类一区二区小说| 国产精品毛片大码女人| 欧美日韩一区二区三区免费看| 奇米色一区二区| **性色生活片久久毛片| 欧美电影一区二区| 成人美女在线视频| 午夜日韩在线观看| 欧美国产欧美综合| 在线不卡中文字幕| 国产精品自在在线| 婷婷久久综合九色综合绿巨人| 国产女同互慰高潮91漫画| 欧美在线播放高清精品| 国产精品2024| 肉色丝袜一区二区| 国产精品美女一区二区| 欧美www视频| 欧洲人成人精品| 大桥未久av一区二区三区中文| 亚洲成av人片一区二区梦乃| 日本一区二区三区久久久久久久久不| 在线观看免费亚洲| 成人黄色av电影| 久久99蜜桃精品| 午夜激情综合网| 亚洲天堂成人在线观看| 国产午夜亚洲精品不卡| 欧美一级日韩不卡播放免费| 色婷婷综合在线| 丁香激情综合五月| 国产精品一级二级三级| 日本麻豆一区二区三区视频| 亚洲精品水蜜桃| 中文字幕乱码日本亚洲一区二区| 日韩精品一区在线| 4438x成人网最大色成网站| 欧美中文字幕久久| 91麻豆swag| 成年人网站91| 成人免费视频app| 国产精品99久久久久久宅男| 美女精品一区二区| 日本亚洲三级在线| 日韩高清国产一区在线| 亚洲一区二区三区四区中文字幕| 综合网在线视频| 自拍偷拍亚洲激情| 亚洲人精品午夜| 亚洲伦理在线免费看| 亚洲自拍偷拍av| 亚洲福利视频一区| 午夜久久久久久久久| 婷婷中文字幕一区三区| 日本成人超碰在线观看| 日本不卡123| 韩国三级在线一区| 国产福利一区在线| 波波电影院一区二区三区| 91社区在线播放| 欧美日韩在线免费视频| 在线成人午夜影院| 91精品国产色综合久久不卡蜜臀 | 欧美日产在线观看| 91精品国产全国免费观看| 91精品国产综合久久久久久久| 91精品国产入口| 久久久不卡网国产精品一区| 久久精品亚洲一区二区三区浴池| 中文在线一区二区| 一二三区精品福利视频| 天堂va蜜桃一区二区三区| 毛片av一区二区| 成人国产亚洲欧美成人综合网 | 激情综合五月天| 狠狠色丁香九九婷婷综合五月| 国产精品18久久久久久久久| 成人中文字幕在线| 欧美影视一区二区三区| 日韩免费视频一区二区| 日本一二三不卡| 一卡二卡欧美日韩| 久久91精品国产91久久小草| 丁香激情综合国产| 欧美日韩一区中文字幕| 欧美电影免费观看高清完整版| 国产色爱av资源综合区| 一区二区三区日韩在线观看| 美女视频黄 久久| 91在线播放网址| 欧美成人福利视频| 亚洲精品亚洲人成人网 | 久久众筹精品私拍模特| 中文字幕一区二区在线播放| 图片区小说区区亚洲影院| 国产iv一区二区三区| 欧美久久婷婷综合色| 国产精品热久久久久夜色精品三区| 一区二区三区色| 国产91精品一区二区麻豆网站 | 91小视频在线免费看| 日韩女优毛片在线| 夜夜嗨av一区二区三区| 懂色av中文字幕一区二区三区| 在线播放日韩导航| 亚洲精品国久久99热| 国产美女视频一区| 91精品久久久久久蜜臀| 亚洲激情在线激情| 国产精品一区二区视频| 欧美一区午夜视频在线观看| 日韩毛片一二三区| 国产成人h网站| 日韩精品一区在线观看| 午夜精品久久一牛影视| 91黄视频在线观看| 国产精品国产三级国产aⅴ中文| 精品制服美女丁香| 欧美日韩日日摸| 亚洲精品福利视频网站| 欧美一卡二卡在线观看| 欧美日韩免费在线视频| 欧美成人aa大片| 日韩欧美国产综合| 99久久精品国产导航| 亚洲免费观看高清完整| 欧美性受xxxx| 亚洲精品日日夜夜| 中文字幕一区二区在线观看 | 不卡的电视剧免费网站有什么| 91精品国产欧美日韩| 午夜视频在线观看一区二区三区 | 国产精品一区久久久久| 欧美日韩在线免费视频| 一区二区三区在线观看网站| 99国产精品久久久| 亚洲色图清纯唯美| 欧洲一区二区三区免费视频| 一区二区三区欧美激情| 精品视频一区二区三区免费| 婷婷丁香久久五月婷婷|