darts.java

来自「DoCoMo 手机Java源码 4人游戏用 Cricket」· Java 代码 · 共 72 行

JAVA
72
字号
package Darts;

import com.nttdocomo.ui.*;

/* Darts Main. */
/* 偙偺傾僾儕偺杮懱 */

public class Darts extends IApplication {

    /* 僞僀僩儖僷僱儖 */
    private TitlePanel titlePanel = null;
    /* 愝掕僷僱儖 */
    private OptionPanel optionPanel = null;
    /* 僎乕儉杮懱 */
    private GameCountUp gameCountUp = null;
    private GameZeroOne gameZeroOne = null;
    private GameCricket gameCricket = null;

    public void start() {
        /* 僞僀僩儖夋柺偺嶌惉 */
        titlePanel = new TitlePanel(this);
        /* 愝掕夋柺偺嶌惉 */
        optionPanel = new OptionPanel(this);

        /* 僞僀僩儖夋柺偺昞帵 */
        Display.setCurrent( titlePanel );
    }

    public void resume() {}

    /* 僎乕儉奐巒 */
    /* 僇僂儞僩傾僢僾 */
    public void playCountUp() {
        gameCountUp = new GameCountUp( this, optionPanel.getPlayerCnt() );
        gameCountUp.start();
    }

    /* 01 */
    public void playZeroOne() {
        gameZeroOne = new GameZeroOne( this, optionPanel.getPlayerCnt(),
                                             optionPanel.getZeroOneNum(),
                                             optionPanel.getZeroOneRound() );
        gameZeroOne.start();
    }

    /* 僋儕働僢僩 */
    public void playCricket() {
//        if ( optionPanel.getPlayerCnt() <= 2 ) {
            gameCricket = new GameCricket( this, optionPanel.getPlayerCnt() );
            gameCricket.start();
//        }
//        else {
//            showTitlePanel();
//        }
    }

    /* 僎乕儉廔椆丄僞僀僩儖夋柺昞帵 */
    public void endGame() {
        showTitlePanel();
    }

    /* 僞僀僩儖夋柺昞帵 */
    public void showTitlePanel() {
        Display.setCurrent( titlePanel );
    }

    /* 愝掕夋柺昞帵 */
    public void showOptionPanel() {
        Display.setCurrent( optionPanel );
    }
}

⌨️ 快捷键说明

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