一、概述...............................................2
1、游戏介绍:..........................................2
2、游戏特色:.........................................2
二、游戏角色设计.......................................3
三、游戏音乐:.........................................5
四、游戏过程截图.......................................5
五、不足之处...........................................7
五、项目评语...........................................7
附录:游戏设计.........................................8
一、概述
1、游戏介绍:
游戏名称:打砖块
游戏题材:射击
游戏风格:射击
游戏类型:射击
运行环境:支持jvm虚拟机的浏览器
开发工具:J2SE
操作方式:可用鼠标直接操作
游戏操作环境:Windows98操作系统以上
推荐配置:
处理器CPU: 赛扬1.0
显卡: 集成
声卡: 集成
硬盘: 1M以上
内存:32MB RAM
操作系统:支持jvm虚拟机的浏览器的操作系统
网络下载: 56K 以上Modem 宽带:(ADSL,Cable Modem)
发行区域:北京
策划编程人员:5人
所在学校:北京金海计算机培训学校
用户群体:适用所有年龄段的人。
游戏故事介绍:本游戏分为三关,玩家必须把砖块全部击中,方可进行下一关的挑战。
1、游戏介绍:
⑴本游戏画面设计具有动感游戏中的图形全部用程序实现的 ,最主要的是游戏中的升级物,游戏中设有五种升级物,五种都是升级物但每一种升级玩家吃后都有不同的效果,玩家吃了升级物后一次可穿透几个砖块,是一款耐玩性很高适合玩家放松心情的游戏,值得你去挑战。
2 、 游戏特色
(2)本游戏的优点具有提高玩家的反应能力.
二、游戏角色设计 游戏设计图片:
1 弹球(共两张)
略(标准的弹球) 略(升级后的弹球)
2弹板(共三张)
略(变窄后的弹板) 略(标准弹板) 略(变宽后的弹板)
3 升级物(共五张)
略(吃后减速) 略(吃后加速) 略(加宽弹板) 略(弹板变窄) 略(弹球变小,并可直穿砖块)
4 砖块(共三张)
略(打一下销毁) 略(打两下销毁) 略(打三下销毁)
5/由于是在PC机上运行,所以使用的单独的图片,没有进行图片分解(请谅解)
三、 游戏音乐
本游戏没有音乐,敬请谅解.
四、游戏过程截图

此图象为第一关游戏中截图。
略
此图片为第二关游戏中截图.
略
此图片为第三关游戏中截图.
略
此图片为失败后的游戏截图.
游戏中的弹球运用了反复弹动的效果 。
上方显示条可以显示游戏状态。
在游戏过程中可以吃到升级物。
因为这是我们的第一个游戏,难免有不足之处,还请大家谅解。
五、不足之处
【教师评语】游戏图形设计方面还没有达到专业水准,不过图形课程还没有学,相信他们学完图形课程,他们设计游戏的水准将大大提高,不过他们设计这款游戏不到一周时间,所以情有可原。
五、项目评语
评语:北京金海计算机培训学校海标工作组(陈余,张卫,黄月光,倪时伟,扬宏毅)设计的游戏是基于Applet平台的游戏,此款游戏功能齐全,设计多个关卡,编码规范,而且有很好的移植性,稍加修改就能移植到各种无线平台,操作简单,体现了软件开发者先进的编程思想和优秀设计者的素质。我们课程分为三大部(初级,中级,高级)分学员完成游戏是在仅仅学完初级(java语言基础)之后,在没有系统讲解游戏的设计和游戏项目的情况下,设计出来的,可以预见,等到我们全部学习结束之后,一定能成为出色的游戏开发者。
指导老师: 许文超
附录:游戏设计
【教师评语】面向对象的思想理解的非常好,考虑周全,设计规范合理,条理清晰,可读性好。在初级教学中已经展现了他们良好的素质,相信在以后不但深入的学习学员们能取得更大的成功。
/*
**2005年3月2日开始***打砖块游戏****海标制作******
**用左右键控制挡板,用回车键开始游戏******
**2005年3月4日结束
*/
import java.applet.* ;
import java.awt.* ;
import java.awt.event.* ;
import java.util.* ;
public class DaZhuanKuai extends Applet implements Runnable
{
/*********常量定义***************/
final int SCREEN_WIDTH= 420 ;//游戏窗口尺寸
final int SCREEN_HEIGHT = 300 ;
/********************************/
LabelmyLabel = new Label ("飞船数") ;
LabellabelScore = new Label ("得分") ;
LabellabelLevel = new Label () ;
Labelmsg = new Label ("开始新游戏……海标制作") ;
TextFieldmyText = new TextField("5",0) ;
TextField textScore = new TextField("0") ;
Brick[] brick ;//砖块
Ballball;//弹球
Paddle paddle ;//挡板
Treasure[] treasure ;//宝物
MediaTracker myTracker ;
Thread clock ;
int brickNumber ;//砖块数量
int visibleBrick ;//可见砖块数量
int treasureNumber ;//宝物数量
boolean isGameRun = false ;//游戏是否正在运行中
int score= 0 ;//所得分数
int ballLife= 5 ;//可用弹球数
int level= 1 ;//当前关卡
int counter= 0 ;//计数器,决定是否提高游戏速度,规则是弹球每撞击一屏幕边界将计数器加一
int counterToon= 0 ;//销毁动画计数器
int velocity;//游戏运行速度
Image backGround ;//背景
Image off ;//虚拟屏幕
Graphics offG ;
Random r= new Random() ;
int mousePositionPre ;
int mousePosition ;
/******************************************/
//游戏初始化
public void init()
{
backGround = getImage (getCodeBase(), "BackGround.jpg") ;
off= createImage (SCREEN_WIDTH, SCREEN_HEIGHT) ;//创建虚拟屏幕
offG = off.getGraphics() ;
myText.addKeyListener(new MyKeyHander()) ;
textScore.setEnabled(false) ;
add(myLabel) ;
add( myText) ;
add(labelScore) ;
add(textScore) ;
add(labelLevel) ;
add(msg) ;
addMouseListener(new mouseHandler()) ;
addMouseMotionListener(new mouseMotion()) ;
myTracker = new MediaTracker(this) ;
ball= new Ball() ;
InitBall() ;
paddle= new Paddle() ;
InitPaddle () ;
InitBricksLevel1() ;
}public void start()
{
setBackground (Color.white) ;
if (clock == null)
{clock = new Thread(this) ;
clock.start() ;
}
}
public void paint (Graphics g)
{
g.drawImage(off, 0, 0, SCREEN_WIDTH, SCREEN_HEIGHT,this) ;
}
public void update (Graphics g)
{
paint (g) ;
}
//游戏主函数
public void run()
{
while (true)
{
try
{
clock.sleep(velocity) ;
}
catch (InterruptedException ie) {}
Color bgColor = getBackground() ;
offG.setColor(bgColor) ;
offG.fillRect(0, 30, SCREEN_WIDTH, SCREEN_HEIGHT) ;
offG.drawImage(backGround, 0, 0, 420, 300, this) ;
ProcessCounter () ;
ProcessBall() ;
ProcessTreasures() ;
DrawShadow() ;
DrawBricks() ;
DrawDestroyBrick() ;
DrawTreasures() ;
offG.drawImage(ball.ballImage, ball.xPos, ball.yPos, 10, 10, this) ;
offG.drawImage(paddle.paddleImage, paddle.pos, 275, paddle.paddleSize, 30, this) ;
DrawFire() ;
PrintScore() ;
repaint() ;
}
}
public void stop()
{
if ((clock != null) &&(clock.isAlive()))
{
clock = null ;
}
}
//键盘控制挡板运动
class MyKeyHander implements KeyListener
{
public void keyPressed(KeyEvent e)
{
if (e.getKeyCode()==e.VK_ENTER && !isGameRun)
{
ball.xMove = -1 ;
ball.yMove = 4 ;
isGameRun = true ;
}
if (e.getKeyCode()==e.VK_RIGHT && isGameRun)
{
paddle.pos+=10;
if (paddle.pos + paddle.paddleSize > SCREEN_WIDTH)
{
//检测挡板是否超出屏幕
paddle.pos-=10;
}
}
else if (e.getKeyCode()==e.VK_LEFT && isGameRun)
{
paddle.pos-=10 ;
if (paddle.pos < 0)
{
//检测挡板是否超出屏幕
paddle.pos+=10;
}
}
}
public void keyReleased(KeyEvent e)
{
}
public void keyTyped(KeyEvent e)
{
}
}
//鼠标控制键盘运动
class mouseHandler implements MouseListener
{
public void mousePressed (MouseEvent e)
{
}
public void mouseReleased (MouseEvent e)
{
}
public void mouseClicked (MouseEvent e)
{
if (!isGameRun)
{
ball.xMove= -1 ;
ball.yMove= 4 ;
isGameRun= true ;
mousePositionPre = e.getPoint().x ;
}
}
public void mouseEntered (MouseEvent e)
{
}
public void mouseExited (MouseEvent e)
{
}
}
public class mouseMotion implements MouseMotionListener
{
public void mouseDragged (MouseEvent e)
{
}
public void mouseMoved (MouseEvent e)
{
if (isGameRun)
{
mousePosition = e.getPoint().x ;
paddle.pos+= mousePosition - mousePositionPre ;
if(paddle.pos + paddle.paddleSize > SCREEN_WIDTH)
{
paddle.pos = SCREEN_WIDTH - paddle.paddleSize ;
}
else if(paddle.pos < 0)
{
paddle.pos = 0 ;
}
mousePositionPre = mousePosition ;
}
}
}
//初始化弹球
public void InitBall()
{
ball.ballImage= getImage (getCodeBase(), "ball.jpg") ;
ball.xPos= 200 ;
ball.yPos= 260 ;
ball.xMove= 0 ;
ball.yMove= 0 ;
ball.aMove= 0 ;
ball.drawFireCount = 0 ;
ball.isAddSpeed = false ;
ball.isSmallBall= false ;
ball.isSubSpeed = false ;
ball.isDrawFire = false ;
}
//初始化挡板
public void InitPaddle ()
{
paddle.paddleImage = getImage (getCodeBase(), "paddle.jpg") ;
paddle.pos= 180 ;
paddle.paddleSize = 40 ;
paddle.isAddPaddle = false ;
paddle.isSubPaddle = false ;
}
//初始化砖块
public void InitBricks(int i)
{
brick[i]= new Brick() ;
brick[i].xPos= 20 + 35 * (i%10) ;
brick[i].yPos= 80 + i/10 * 20 ;
brick[i].n= 0 ;
brick[i].time= 10 ;
brick[i].destroyImageNumber = 2 ;
brick[i].brickDestroy = new Image[brick[i].destroyImageNumber] ;
brick[i].brickDestroy[0] = getImage (getCodeBase(),"brick1.jpg") ;
brick[i].brickDestroy[1] = getImage (getCodeBase(),"brick.jpg") ;
}
//初始化砖块(第一关)
publicvoid InitBricksLevel1()
{
msg.setText("宇宙新兵训练场海标制作") ;
labelLevel.setText("第一关") ;
velocity= 30 ;
brickNumber= 30 ;
visibleBrick= brickNumber ;
brick= new Brick[brickNumber] ;
for (int i = 0; i < brickNumber; ++i)
{
InitBricks(i) ;
brick[i].brickImage= getImage (getCodeBase(),"brick2.jpg") ;
brick[i].life= 1 ;
myTracker.addImage(brick[i].brickImage, 0) ;
}
try
{
myTracker.waitForAll() ;
}
catch (InterruptedException ie) {}
while ((myTracker.statusAll(true) & MediaTracker.COMPLETE) == 0) {}
InitTreasure() ;
}
//初始化砖块(第二关)
public void InitBricksLevel2()
{
msg.setText("基地保卫战海标制作") ;
labelLevel.setText("第二关") ;
velocity= 20 ;
brickNumber= 40 ;
visibleBrick = brickNumber ;
brick= new Brick[brickNumber] ;
for (int i = 0; i < brickNumber/2; ++i)
{
InitBricks(i) ;
brick[i].brickImage= getImage (getCodeBase(),"brick3.jpg") ;
brick[i].life= 2 ;
InitBricks(i+20) ;
brick[i+20].brickImage= getImage (getCodeBase(),"brick3.jpg") ;
brick[i+20].life= 2 ;
}
InitTreasure() ;
}
//初始化砖块(第三关)
public void InitBricksLevel3()
{
msg.setText("光荣与梦想海标制作") ;
labelLevel.setText("第三关");
velocity= 15 ;
brickNumber= 60 ;
visibleBrick = brickNumber ;
brick= new Brick[brickNumber] ;
boolean b= false ;
for (int i = 0; i < brickNumber; ++i)
{
InitBricks(i) ;
brick[i].brickImage= getImage (getCodeBase(),"brick4.jpg") ;
brick[i].life= 3 ;
}
InitTreasure() ;
}
//初始化宝物
public void InitTreasure()
{
treasureNumber = 10 ;
treasure= new Treasure[treasureNumber] ;
for (int i = 0; i < treasureNumber; ++i)
{
treasure[i]= new Treasure() ;
treasure[i].kind= (i+2)/2 ;
treasure[i].move= 5 ;
treasure[i].isFall = false ;
switch (treasure[i].kind)
{
case 1 :
treasure[i].treasureImage = getImage (getCodeBase(),"treasure1.jpg") ;
break ;
case 2 :
treasure[i].treasureImage = getImage (getCodeBase(),"treasure2.jpg") ;
break ;
case 3 :
treasure[i].treasureImage = getImage (getCodeBase(),"treasure3.jpg") ;
break ;
case 4 :
treasure[i].treasureImage = getImage (getCodeBase(),"treasure4.jpg") ;
break ;
case 5 :
treasure[i].treasureImage = getImage (getCodeBase(),"treasure5.jpg") ;
break ;
}
int brickTreasure ;//含有宝物的砖块的序号
do
{
brickTreasure = r.nextInt(brickNumber) ;
}while (brick[brickTreasure].isTreasure) ;
brick[brickTreasure].isTreasure = true ;
brick[brickTreasure].treasure= i ;
treasure[i].xPos = brick[brickTreasure].xPos-5 ;
treasure[i].yPos = brick[brickTreasure].yPos+10 ;
}
}
//处理弹球运动
public void ProcessBall()
{ball.xPos -= ball.xMove ; //计算弹球的下一坐标
ball.yPos -= ball.yMove ;
//检测弹球是否碰到屏幕边界
if (ball.xPos+ball.ballsize > SCREEN_WIDTH || ball.xPos < 0)
{ball.isDrawFire = true ;
ball.fireXPos= ball.xPos ;
ball.fireYPos= ball.yPos ;
ball.xMove = -ball.xMove ;
ball.xPos -= ball.xMove ;
//ball.yPos += ball.yMove ;
++counter ;}
if (ball.yPos < 30)
{ball.isDrawFire = true ;
ball.fireXPos= ball.xPos ;
ball.fireYPos= ball.yPos ;
ball.yMove = -ball.yMove ;
ball.yPos -= ball.yMove ;
++counter ;}
//检测弹球是否“撞毁"
if(ball.yPos+ball.ballsize > SCREEN_HEIGHT)
{msg.setText("你的飞船被敌人击中了!") ;
InitBall() ;
InitPaddle() ;
isGameRun = false ;
--ballLife ;
if (ballLife < 0)
{
msg.setText("你输了,我再给你一次机会。") ;
ballLife = 3 ;}
}
//检测弹球是否碰到挡板
if ((ball.yPos > 260)&&(ball.yPos < 280))
{
if ((ball.xPos>(paddle.pos-ball.ballsize))&&(ball.xPos < paddle.pos+paddle.paddleSize))
{
//根据弹球碰到挡板的位置不同来决定弹球反弹的角度
ball.isDrawFire = true ;
ball.fireXPos= ball.xPos ;
ball.fireYPos= ball.yPos ;
int position = paddle.pos + paddle.paddleSize - ball.xPos ;
if (paddle.isAddPaddle)
{position = (int)(position/1.4) ;
}
else if (paddle.isSubPaddle)
{
position = (int)(position/0.6) ;
}
if (position < 5)
{
ball.xMove = -5 ;
ball.yMove = 3 ;
}
else if (position < 10)
{
ball.xMove = -4 ;
ball.yMove = 3 ;
}
else if (position < 15)
{
ball.xMove = -3 ;
ball.yMove = 4 ;
}
else if (position < 20)
{
ball.xMove = -2 ;
ball.yMove = 4 ;
}
else if (position < 25)
{
ball.xMove = -1 ;
ball.yMove = 5 ;
}
else if (position < 30)
{
ball.xMove = 1 ;
ball.yMove = 5 ;
}
else if (position < 35)
{
ball.xMove = 2 ;
ball.yMove = 4 ;
}
else if (position < 40)
{
ball.xMove = 3 ;
ball.yMove = 4 ;
}
else if (position < 45)
{
ball.xMove = 4 ;
ball.yMove = 3 ;
}
else
{
ball.xMove = 5 ;
ball.yMove = 3 ;
}
msg.setText("") ;
}
}
//检测是否碰到砖块
for (int i = 0; i < brickNumber; ++i)
{if (brick[i].isAlive)
{
if (((ball.xPos+ball.ballsize)>brick[i].xPos)&&((ball.xPos)<(brick[i].xPos+brick[i].WIDTH))&&
((ball.yPos+ball.ballsize)>brick[i].yPos)&&((ball.yPos)<(brick[i].yPos+brick[i].HEIGHT)))
{
ball.isDrawFire = true ;
ball.fireXPos= ball.xPos ;
ball.fireYPos= ball.yPos ;
if (!ball.isSmallBall)
{
//检测弹球是否处于正常状态,如果处于“小球”状态,碰到砖块将不会反弹,而是直穿过去
ball.yMove = -ball.yMove ;
if(((ball.xPos+ball.ballsize/2)<(brick[i].xPos+brick[i].WIDTH/2))&&(ball.xMove<0))
{
//检测碰到砖块的哪一边,以此决定弹球的反弹方向
ball.xMove = -ball.xMove ;
}
else if(((ball.xPos+ball.ballsize/2)>(brick[i].xPos+brick[i].WIDTH/2))&&(ball.xMove>0))
{
ball.xMove = -ball.xMove ;
}
ball.xMove += (-1 + r.nextInt(3)) ;//产生随机运动
}
--brick[i].life ;
if (brick[i].life <= 0)
{
//判断被击中的砖块是否该被摧毁还是改变形状
if (brick[i].isTreasure)
{//检测被击毁的砖块是否含有宝物
treasure[brick[i].treasure].isFall = true ;
}
brick[i].isAlive = false ;
brick[i].isDestroy = true ;
msg.setText("成功击毁目标!") ;
score +=10 ;
--visibleBrick ;
}
else if (brick[i].life == 1)
{brick[i].brickImage = getImage (getCodeBase(),"brick2.jpg") ;
msg.setText("成功击中目标!") ;
score +=5 ;
}
else if (brick[i].life == 2)
{brick[i].brickImage = getImage (getCodeBase(),"brick3.jpg") ;
msg.setText("成功击中目标!") ;
score +=2 ;
}
break ;
}
}
}
}
//处理宝物运动
public void ProcessTreasures()
{for (int i = 0; i < treasureNumber; ++i)
{
if (treasure[i].isFall)
{treasure[i].yPos += treasure[i].move ;
//检测挡板是否“吃掉”宝物
if ((treasure[i].yPos>260)&&((treasure[i].xPos+treasure[i].WIDTH)>paddle.pos )
&&(treasure[i].xPos<(paddle.pos+paddle.paddleSize)))
{
treasure[i].isFall = false ;
switch(treasure[i].kind)
{
case 1 :
if (!ball.isSubSpeed)
{
msg.setText("你能更好地控制飞船了。") ;
velocity += 10 ;
if (ball.isAddSpeed)
{
ball.isAddSpeed = false ;
}
else
{
ball.isSubSpeed = true ;
}
}
break ;
case 2 :
if (!ball.isAddSpeed)
{
msg.setText("你控制飞船的难度增加。") ;
velocity -= 10 ;
if (ball.isSubSpeed)
{
ball.isSubSpeed = false ;
}
else
{
ball.isAddSpeed = true ;
}
}
break ;
case 3 :
if (!paddle.isAddPaddle)
{
msg.setText("飞船防御力提升!") ;
if (paddle.isSubPaddle)
{
paddle.paddleImage = getImage (getCodeBase(), "paddle.jpg") ;
paddle.paddleSize= 40 ;
paddle.isSubPaddle = false ;
}
else
{
paddle.paddleImage = getImage (getCodeBase(), "paddle2.jpg") ;
paddle.paddleSize = 60 ;
paddle.isAddPaddle = true ;
}
}
break ;
case 4 :
if (!paddle.isSubPaddle)
{
msg.setText("飞船防御力降低。") ;
if (paddle.isAddPaddle)
{
paddle.paddleImage = getImage (getCodeBase(),"paddle.jpg") ;
paddle.paddleSize= 40 ;
paddle.isAddPaddle = false ;
}
else
{
paddle.paddleImage = getImage (getCodeBase(), "paddle1.jpg") ;
paddle.paddleSize= 20 ;
paddle.isSubPaddle = true ;}
}
break ;
case 5 :
if (!ball.isSmallBall)
{
msg.setText("你换了种武器。") ;
ball.ballImage = getImage (getCodeBase(), "ball1.jpg") ;
ball.isSmallBall = true ;
ball.ballsize = 5 ;
}
break ;
}
}
//检测宝物是否消失
if (treasure[i].yPos > 300)
{
treasure[i].isFall = false ;
}
}
}
}
//在屏幕上输出宝物
public void DrawTreasures ()
{
for (int i = 0; i < treasureNumber; ++i)
{
if (treasure[i].isFall)
{
offG.drawImage(treasure[i].treasureImage, treasure[i].xPos, treasure[i].yPos, 20, 20, this) ;
}
}
}
//在屏幕上绘画砖块
public void DrawBricks()
{
if (visibleBrick <= 0)
{
msg.setText("恭喜你,过关了!") ;
isGameRun = false ;
InitBall() ;
InitPaddle() ;
++ballLife ;
if (++level > 3)
{
level = 1 ;
}
switch (level)
{
case 1 :
InitBricksLevel1() ;
break ;
case 2 :
InitBricksLevel2() ;
break ;
case 3 :
InitBricksLevel3() ;
break ;
}
}
for (int i = 0; i < brickNumber; ++i)
{
if (brick[i].isAlive)
{
offG.drawImage(brick[i].brickImage, brick[i].xPos, brick[i].yPos,
34, 10, this) ;
}
}
}
//播放被销毁的砖块的动画
public void DrawDestroyBrick ()
{
for (int i = 0; i < brickNumber; ++i)
{
if (brick[i].isDestroy)
{
offG.drawImage(brick[i].brickDestroy[brick[i].n], brick[i].xPos, brick[i].yPos,
34, 10, this) ;
if (counterToon++ > brick[i].time)
{
counterToon = 0 ;
++brick[i].n ;
}
if (brick[i].n >= brick[i].destroyImageNumber)
{
brick[i].isDestroy = false ;
}
}
}
}
//输出得分等文字信息
public void PrintScore()
{
String strScore = new String() ;
strScore = Integer.toString(score) ;
textScore.setText(strScore) ;
String strBallLife = new String() ;
strBallLife = Integer.toString(ballLife) ;
myText.setText(strBallLife) ;
}
//处理计数器
public void ProcessCounter()
{
if (counter > 10)
{
velocity -= 1 ;
counter = 0 ;
msg.setText("飞船速度提高了!") ;
if (velocity < 20)
{
velocity = 20 ;
}
}
}
//当弹球撞击到物体时弹出的火花
public void DrawFire()
{
if (ball.yMove>0 && ball.isDrawFire && ball.drawFireCount++ < 3)
{
for (int i = ball.fireXPos - ball.xMove*5; i < ball.fireXPos +ball.ballsize +ball.xMove*5; i+=3)
for (int j = ball.fireYPos -ball.yMove*5; j < ball.fireYPos; j+=3)
{
if (r.nextInt(20) == 10)
{
offG.setColor(Color.orange) ;
offG.fillOval (i,j,3,3) ;
}
}
}
else if (ball.yMove<0 && ball.isDrawFire && ball.drawFireCount++ < 3)
{
for (int i = ball.fireXPos - ball.xMove*5 ; i < ball.fireXPos+ball.ballsize-ball.xMove*5; i+=3)
for (int j = ball.fireYPos+ball.ballsize; j < ball.fireYPos+ball.ballsize-ball.yMove*5; j+=3)
{
if (r.nextInt(20) == 10)
{
offG.setColor(Color.orange) ;
offG.fillOval (i,j,3,3) ;
}
}
}
else
{
ball.isDrawFire = false ;
ball.drawFireCount = 0 ;
}
}
public void DrawShadow()
{
offG.setColor(new Color(100, 100, 100)) ;
/*
for (int i = 0; i < brickNumber; ++i)
{
if (brick[i].isAlive)
{
offG.fillRoundRect(brick[i].xPos+5,brick[i].yPos+5,brick[i].WIDTH,brick[i].HEIGHT,10,10) ;
}
}
*/
offG.fillOval(ball.xPos + 5,ball.yPos+5,ball.ballsize,ball.ballsize) ;
}
}
/*
***3月 3日开始*****弹球***********
*/
import java.awt.* ;
public class Ball
{
int ballsize = 10 ;//弹球直径
Image ballImage ;//弹球图象
intxPos ;//位置(左上角)
intyPos ;
intxMove ;//移动方向,速度
intyMove ;
intaMove ;
boolean isAddSpeed ;//弹球是否处于正常状态
boolean isSubSpeed ;
boolean isSmallBall ;
boolean isDrawFire ;
int drawFireCount ;
int fireXPos ;
int fireYPos ;
}
/* |