⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 flashmanager.java.bak

📁 一个用Java开发的射击类游戏
💻 BAK
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -