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

📄 bombimageblock.java

📁 非常好的java collapse游戏代码
💻 JAVA
字号:
/* * JCollapse - Java Collapse Game * Copyright (C) 2005 Erico Gon鏰lves Rimoli *  * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. *  * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. *  * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA. */package sourceforge.net.projects.jcollapse.game.blocks;import java.awt.Graphics2D;import java.awt.Image;import sourceforge.net.projects.jcollapse.engine.block.BombBlock;public class BombImageBlock extends BombBlock implements DisplayableGraphic {	private Image m_Image;	/**	 * Constructor for Bomb Image Block's	 * @param name the name for this Block	 * @param enable if you enable, means that you can interact with this	 * @param nameOfBlockToDestroy the name of the Block that will be destroyed when user click in this Block	 * @param image the image for this Block	 */	public BombImageBlock( String name, boolean enable, String nameOfBlockToDestroy, Image image ) {		super( name, enable, nameOfBlockToDestroy );		setImage( image );	}	/**	 * Set the Image of this Block	 * @param image the image for this object	 */	public void setImage( Image image ) {		m_Image = image;	}		/**	 * Get the Image for this Block	 * @return the Image for this Block	 */	public Image getImage() {		return m_Image;	}		/* (non-Javadoc)	 * @see sourceforge.net.projects.jcollapse.game.blocks.PrintableBlock#drawBlock(java.awt.Graphics, int, int, int, int)	 */	public void drawBlock(Graphics2D graphics, int x, int y, int width, int height) {		if( m_Image != null )			graphics.drawImage( m_Image, x, y, width, height, null );	}}

⌨️ 快捷键说明

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