introscreen.java

来自「一个基于J2ME的pacman游戏」· Java 代码 · 共 96 行

JAVA
96
字号
/**

 * PacMan for J2ME Devices

 * CS 327 - Design Project, Fall 2002

 * University of Illinois, Urbana-Champaign

 * 

 * file: IntroScreen.java 

 * contact: Chris Epsom

 * date: 11/24/02

 **/



//----------------------------------------------------------------------------//





import javax.microedition.lcdui.*;

//import java.lang.Thread;



//This is a class that will be later used to Display the Intro Screen



public class IntroScreen extends Form implements ItemStateListener

{

    /**

     * Used to tell which menu item is highlighted.

     */

    private int isHighlighted;



    /**

     * Used to give an array of menu options.

     */

    private Item[] menuList;



    /**

	 * The default display for this midlet.

	 * This variable is assigned during object construction.

	 * Added April 8, 2003 by Benson Fung

	 **/

	Display disp_;



    /**

     * Constructor

     **/

    public IntroScreen(Display d)

    {

		super("Intro Screen");

		disp_ = d;

		ChoiceGroup startChoice = new ChoiceGroup("Menu", Choice.EXCLUSIVE);

		startChoice.append("Start Game", null);

		this.append(startChoice);

        // Add the code later

    }

	

	/**

     * Abstract class from Form

     * @param the Item that is changing

     **/        

    public void itemStateChanged(Item item)

    {

        // Add the code later

    }



    /**

     * Used to set the screen to display next.

     * @param the userChoice to set the screen

     **/

    public void setScreen(int numChoice)

    {

        // Add the code later

		

    }



    /**

     * Used to move to the next screen.

     **/

    public void advanceFrame()

    {

        //Add the code later

    }



    /**

     * Used to display the information to the screen

     **/

    public void paint()

    {

        // Add the code later

    }

	

	/**

	 * Shows the gameboard and starts the game.

	 * Added April 8, 2003 by Benson Fung

	 **/

	public void show()

	{

		disp_.setCurrent(this);

	}



    

}

⌨️ 快捷键说明

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