flashmanager.java.bak
来自「一个用Java开发的射击类游戏」· BAK 代码 · 共 35 行
BAK
35 行
public class FlashManager
{
private Sprite explodeFlashSprite = null;
private int frameCount = 0;
private int currentFrame = 0;
public FlashManager()
{
try
{
Image tempExplodeFlash = Image.createImage("/explodeFlash.png");
explodeFlashSprite = new Sprite(tempExplodeFlash, War.EXPLODE_FLASH_WIDTH, War.EXPLODE_FLASH_HEIGHT);
}
catch (IOException ie)
{
}
frameCount = explodeFlashSprite.getRawFrameCount();
currentFrame = frameCount;
}
public void startFlash(int tempExplodeX, int tempExplodeY)
{
explodeFlashSprite.setPosition(tempExplodeX, tempExplodeY);
currentFrame = 0;
}
public void updateFlash(Graphics g)
{
if (currentFrame == frameCount)
{
return;
}
explodeFlashSprite.setFrame(currentFrame);
explodeFlashSprite.paint(g);
currentFrame++;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?