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

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

?? score.java

?? 還記得兒時在游戲機上玩坦克大戰嗎?如今這種經典游戲不在游戲機上玩了
?? JAVA
字號:
//------------------------------------------------------------------------------
//                         COPYRIGHT 2008 GUIDEBEE
//                           ALL RIGHTS RESERVED.
//                     GUIDEBEE CONFIDENTIAL PROPRIETARY
///////////////////////////////////// REVISIONS ////////////////////////////////
// Date       Name                 Tracking #         Description
// ---------  -------------------  ----------         --------------------------
// 19JAN2008  James Shen                 	      Initial Creation
////////////////////////////////////////////////////////////////////////////////
//Permission is hereby granted, free of charge, to any person obtaining a copy
//of this software and associated documentation files (the "Software"), to deal
//in the Software without restriction, including without limitation the rights
//to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
//copies of the Software, and to permit persons to whom the Software is
//furnished to do so, subject to the following conditions:
//
//The above copyright notice and this permission notice shall be included in all
//copies or substantial portions of the Software.
//
//The Software shall be used for Good, not Evil.
//
//THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
//IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
//FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
//AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
//LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
//OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
//SOFTWARE.
//Any questions, feel free to drop me a mail at james.shen@guidebee.biz.
//--------------------------------- PACKAGE ------------------------------------
package com.pstreets.game.battlecity;

//--------------------------------- IMPORTS ------------------------------------
import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.*;

//[------------------------------ MAIN CLASS ----------------------------------]
////////////////////////////////////////////////////////////////////////////////
//--------------------------------- REVISIONS ----------------------------------
// Date       Name                 Tracking #         Description
// --------   -------------------  -------------      --------------------------
// 19JAN2008  James Shen                 	      Initial Creation
////////////////////////////////////////////////////////////////////////////////
/**
 * The classes displays score number when an enemy tank is destoryed or player
 * obtains an powerup.
 * <p>
 * <hr><b>&copy; Copyright 2008 Guidebee, Inc. All Rights Reserved.</b>
 * @version     1.00, 19/01/08
 * @author      Guidebee, Inc.
 */
public final class Score extends Sprite implements Actor{
    
    /**
     * score 100
     */
    public final static int SCORE_100 =0;
    
    /**
     * score 200
     */
    public final static int SCORE_200 =1;
    
    /**
     * score 300
     */
    public final static int SCORE_300 =2;
    
    /**
     * score 400
     */
    public final static int SCORE_400 =3;
    
    /**
     * score 500
     */
    public final static int SCORE_500 =4;
    
    /**
     * the score value.
     */
    private int scoreValue=-1;
    
    /**
     * maximun number of score in the battle field.
     */
    private static final int POOL_SIZE = 10;
    
    /**
     * This pool store all scores.
     */
    private static Score SCORE_POOL[];
    
    /**
     * the start time of the displaying the score.
     */
    private long startTime=0;
    /**
     * the score live time, default 1 second
     */
    private static long livePeriod=1000;
    
    /**
     * Tank should know about the battle field.
     */
    private static BattleField battleField;
    
    /**
     * Tank should know about the layer manager.
     */
    private static LayerManager layerManager;
    
    /**
     * initial the score pool.
     */
    static {
        SCORE_POOL = new Score[POOL_SIZE];
        for(int i=0;i<POOL_SIZE;i++){
            SCORE_POOL[i]=new Score();
            SCORE_POOL[i].setVisible(false);
        }

    }

    ////////////////////////////////////////////////////////////////////////////
    //--------------------------------- REVISIONS ------------------------------
    // Date       Name                 Tracking #         Description
    // ---------  -------------------  -------------      ----------------------
    // 19JAN2008  James Shen                 	          Initial Creation 
    ////////////////////////////////////////////////////////////////////////////
    /**
     * Set the value of the score.
     * @param value new value.
     */
    public void setValue(int value){
        this.scoreValue=value;
        setFrame(value);
    }
    
    ////////////////////////////////////////////////////////////////////////////
    //--------------------------------- REVISIONS ------------------------------
    // Date       Name                 Tracking #         Description
    // ---------  -------------------  -------------      ----------------------
    // 19JAN2008  James Shen                 	          Initial Creation 
    ////////////////////////////////////////////////////////////////////////////
    /**
     * return the value for the score.
     * @return the value of the score.
     */
    public int getValue(){
        return this.scoreValue;
    }
    
    ////////////////////////////////////////////////////////////////////////////
    //--------------------------------- REVISIONS ------------------------------
    // Date       Name                 Tracking #         Description
    // ---------  -------------------  -------------      ----------------------
    // 19JAN2008  James Shen                 	          Initial Creation 
    ////////////////////////////////////////////////////////////////////////////
    /**
     * Constructor.
     */
    private Score() {
        super(ResourceManager.getInstance().getImage(ResourceManager.SCORE),
                ResourceManager.getInstance().
                    getImage(ResourceManager.SCORE).getWidth()/5,
                ResourceManager.getInstance().
                    getImage(ResourceManager.SCORE).getHeight());
    }
    
    
    ////////////////////////////////////////////////////////////////////////////
    //--------------------------------- REVISIONS ------------------------------
    // Date       Name                 Tracking #         Description
    // ---------  -------------------  -------------      ----------------------
    // 17JAN2008  James Shen                 	          Initial Creation 
    ////////////////////////////////////////////////////////////////////////////
    /**
     * Operation be done in each tick.
     */
    public void tick(){
        if(isVisible()){
            long tickTime = System.currentTimeMillis();
            if(startTime>0){
                if(tickTime-startTime>livePeriod){
                    setVisible(false);
                    startTime=0;
                    return;
                }
            }
        }
    }
    
    ////////////////////////////////////////////////////////////////////////////
    //--------------------------------- REVISIONS ------------------------------
    // Date       Name                 Tracking #         Description
    // ---------  -------------------  -------------      ----------------------
    // 17JAN2008  James Shen                 	          Initial Creation
    ////////////////////////////////////////////////////////////////////////////
    /**
     * In give position, display score.
     * @param x the x coordinate.
     * @param y the y coordinate.
     * @param value the score value.
     * @return the score object.
     */
    public static Score show(int x, int y,int value) {
        for (int i = 0; i < POOL_SIZE; ++i) {
            Score score = SCORE_POOL[i];
            if (!score.isVisible()) {
                score.startTime=System.currentTimeMillis();
                score.setRefPixelPosition(x, y);
                score.setValue(value);
                score.setVisible(true);
                return score;
            }
        }
        return null;
    }
    
    ////////////////////////////////////////////////////////////////////////////
    //--------------------------------- REVISIONS ------------------------------
    // Date       Name                 Tracking #         Description
    // ---------  -------------------  -------------      ----------------------
    // 15JAN2008  James Shen                 	          Initial Creation
    ////////////////////////////////////////////////////////////////////////////
    /**
     * Set the layerManager for scores.
     */
    public static void setLayerManager(LayerManager manager) {
        layerManager = manager;
        if (layerManager != null){
            
            for (int i = 0; i < POOL_SIZE; i++)
                layerManager.append(SCORE_POOL[i]);
        }
    }
    
    ////////////////////////////////////////////////////////////////////////////
    //--------------------------------- REVISIONS ------------------------------
    // Date       Name                 Tracking #         Description
    // ---------  -------------------  -------------      ----------------------
    // 15JAN2008  James Shen                 	          Initial Creation
    ////////////////////////////////////////////////////////////////////////////
    /**
     * Set the Battle field for scores.
     */
    public static void setBattleField(BattleField field) {
        battleField = field;
    }
    
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区国产精品| 亚洲va中文字幕| 亚洲一区在线视频| 国产精品91xxx| 欧美亚洲一区二区三区四区| 日本一区二区三区四区| 日韩二区在线观看| 欧美午夜一区二区三区| 国产日韩欧美一区二区三区综合| 日韩福利视频网| 一本久道中文字幕精品亚洲嫩 | 日韩欧美国产精品| 一区二区三区在线影院| 国产精品久久久久影视| 最新日韩av在线| 日本成人在线电影网| 国产成人在线色| 欧美日韩三级在线| 欧美一区二区三区喷汁尤物| 日韩欧美一级特黄在线播放| 亚洲欧洲av另类| 精品中文av资源站在线观看| 91香蕉视频在线| 日韩视频中午一区| 一区二区三区欧美日| 福利视频网站一区二区三区| 91麻豆精品国产91久久久使用方法| 亚洲欧美在线高清| 国产在线精品一区二区不卡了 | 亚洲男人电影天堂| 韩国欧美一区二区| 色香蕉成人二区免费| 精品国产区一区| 亚洲一区二区五区| 成人在线视频一区| 欧美成人午夜电影| 久久国产精品第一页| 欧美亚洲日本国产| 亚洲精品一二三四区| 91色九色蝌蚪| 中文字幕av免费专区久久| 国产永久精品大片wwwapp| 日韩三区在线观看| 午夜精品国产更新| 在线观看日韩毛片| ...中文天堂在线一区| 日本亚洲欧美天堂免费| 欧美在线不卡视频| 亚洲a一区二区| 欧美少妇一区二区| 一二三区精品视频| 色8久久人人97超碰香蕉987| 中文字幕一区不卡| 99久久精品情趣| 中文字幕一区二区在线播放| 国产精品456| 久久精品欧美一区二区三区麻豆| 久久精品国产亚洲5555| 精品裸体舞一区二区三区| 国内外成人在线| 久久久精品国产99久久精品芒果| 黄色资源网久久资源365| 欧美哺乳videos| 国产aⅴ精品一区二区三区色成熟| 久久综合精品国产一区二区三区 | 国产在线一区二区| 久久久久久久综合狠狠综合| 国产剧情一区在线| 国产精品欧美久久久久无广告| 国产91丝袜在线播放0| 国产精品美女久久久久久久久| 波多野结衣91| 亚洲一区二区精品3399| 欧美一区二区三区播放老司机| 久久精品国产亚洲a| 中文字幕欧美三区| 欧美日韩性生活| 精品一区二区三区久久| 亚洲精品一线二线三线 | 亚洲欧美日韩国产成人精品影院| 欧美在线小视频| 天天综合网天天综合色| 欧美mv和日韩mv的网站| 成人激情黄色小说| 亚洲国产裸拍裸体视频在线观看乱了 | 日韩一区二区三区高清免费看看| 激情图片小说一区| 亚洲免费观看高清完整版在线观看熊| 欧美一区二区精品在线| 风间由美一区二区三区在线观看| 伊人一区二区三区| 精品国产三级电影在线观看| 91看片淫黄大片一级| 人人狠狠综合久久亚洲| 亚洲欧美日韩中文播放| 日韩欧美国产电影| 91美女福利视频| 韩国精品久久久| 亚洲国产精品精华液网站| 欧美成人艳星乳罩| 欧美日韩一区二区欧美激情| 国产米奇在线777精品观看| 一区二区三区欧美日韩| 久久夜色精品一区| 欧美日韩美少妇| 成人国产一区二区三区精品| 麻豆91免费观看| 一区二区成人在线| 精品国产伦一区二区三区观看体验 | 久久久久国产一区二区三区四区| 在线观看中文字幕不卡| 国产真实乱子伦精品视频| 日韩中文字幕一区二区三区| 久久嫩草精品久久久久| 欧美日韩午夜在线视频| 成人av免费在线观看| 亚洲一区二区三区四区五区黄| 国产精品女人毛片| 久久无码av三级| 99久久免费视频.com| 国产成人免费9x9x人网站视频| 免费av网站大全久久| 亚洲欧洲av另类| 成人欧美一区二区三区白人 | 麻豆国产91在线播放| 午夜视黄欧洲亚洲| 亚洲自拍与偷拍| 日韩码欧中文字| 一色桃子久久精品亚洲| 国产精品欧美一区二区三区| 国产三区在线成人av| 国产婷婷色一区二区三区| 久久蜜臀精品av| 久久伊人蜜桃av一区二区| 久久色视频免费观看| 久久综合色8888| 国产午夜精品理论片a级大结局| 精品人伦一区二区色婷婷| 精品久久人人做人人爽| 久久久久久一级片| 欧美激情一区二区三区在线| 中文字幕精品综合| 综合网在线视频| 亚洲午夜久久久| 日本不卡的三区四区五区| 亚洲一区二区三区在线| 亚洲综合激情网| 日本aⅴ免费视频一区二区三区| 丝袜美腿成人在线| 美女脱光内衣内裤视频久久网站| 秋霞成人午夜伦在线观看| 日韩专区一卡二卡| 久久精品国产成人一区二区三区 | 黄色精品一二区| 国产精品综合久久| 国产成人精品www牛牛影视| 国产精品一区一区| 成人午夜伦理影院| 色综合天天在线| 欧美一区永久视频免费观看| 久久免费偷拍视频| 亚洲免费av在线| 日本不卡一区二区| 国产成人福利片| 欧美在线高清视频| 久久综合国产精品| 综合精品久久久| 日本欧美一区二区| 成人免费视频一区| 在线91免费看| 中文字幕免费不卡| 亚洲成人在线免费| 国产精品综合视频| 欧美三级中文字幕| 久久精品亚洲精品国产欧美| 亚洲乱码一区二区三区在线观看| 奇米一区二区三区av| www.色综合.com| 日韩三级高清在线| 亚洲天堂成人在线观看| 天使萌一区二区三区免费观看| 国产精品1024| 欧美乱妇15p| 一区二区三区在线免费观看| 国产在线精品一区二区三区不卡| 91九色02白丝porn| 国产欧美日韩中文久久| 五月激情丁香一区二区三区| 91亚洲国产成人精品一区二三| 91精品国产欧美一区二区| 一区二区三区资源| 成人高清伦理免费影院在线观看| 在线播放中文字幕一区| 久久婷婷久久一区二区三区| **性色生活片久久毛片| 国产伦精一区二区三区| 日韩手机在线导航| 天天综合天天做天天综合| 91黄色免费观看| 国产精品久久久久9999吃药|