Java

本类阅读TOP10

·使用MyEclipse开发Struts框架的Hello World!(录像1)
·hibernate配置笔记
·AOP编程入门--Java篇
·linux下Tomcat 5.0.20 与 Apache 2 安装/集成/配置
·在win2003下整合了整合Tomcat5.5+ apache_2.0.53+ mod_jk_2.0.47.dll
·构建Linux下IDE环境--Eclipse篇
·Jsp 连接 mySQL、Oracle 数据库备忘(Windows平台)
·ASP、JSP、PHP 三种技术比较
·Tomcat5.5.9的安装配置
·AWT GUI 设计笔记(二)

分类导航
VC语言Delphi
VB语言ASP
PerlJava
Script数据库
其他语言游戏开发
文件格式网站制作
软件工程.NET开发
The Game API package provides a series of classes that enable the development of rich gaming content for wireless devices.

作者:未知 来源:月光软件站 加入时间:2005-2-28 月光软件站

javax.microedition.lcdui.game
Classes 
GameCanvas
Layer
LayerManager
Sprite
TiledLayer

API Overview

The API is comprised of five classes:

GameCanvas

This class is a subclass of LCDUI's Canvas and provides the basic 'screen' functionality for a game.  In addition to the methods inherited from Canvas, this class also provides game-centric features such the ability to query the current state of the game keys and synchronous graphics flushing; these features simplify game development and improve performance.

Layer

The Layer class represents a visual element in a game such as a Sprite or a TiledLayer.  This abstract class forms the basis for the Layer framework and provides basic attributes such as location, size, and visibility.

LayerManager

For games that employ several Layers, the LayerManager simplifies game development by automating the rendering process.  It allows the developer set a view window that represents the user's view of the game.  The LayerManager automatically renders the game's Layers to implement the desired view.

Sprite

A Sprite is basic animated Layer that can display one of several graphical frames.  The frames are all of equal size and are provided by a single Image object.  In addition to animating the frames sequentially, a custom sequence can also be set to animation the frames in an arbitrary manner.  The Sprite class also provides various transformations (flip and rotation) and collision detection methods that simplify the implementation of a game's logic.

TiledLayer

This class enables a developer to create large areas of graphical content without the resource usage that a large Image object would require.  It is a comprised of a grid of cells, and each cell can display one of several tiles that are provided by a single Image object.  Cells can also be filled with animated tiles whose corresponding pixel data can be changed very rapidly; this feature is very useful for animating large groups of cells such as areas of water.




相关文章

相关软件