?? battle.java
字號:
/*
* Created on 2005-2-8
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package components;
import java.awt.Graphics2D;
import java.awt.*;
import shape.IShape;
/**
* @author AnSen
*
* TODO To change the template for this generated type comment go to Window -
* Preferences - Java - Code Style - Code Templates
*/
public class Battle extends GmObstacle implements IScriptRender {
Image buffImage = null;
/**
* @param shp
*/
public Battle(IShape shp, Image img) {
buffImage = img;
this.ishpframe = shp;
}
/*
* (non-Javadoc)
*
* @see components.IScriptRender#isRenderable(int, int, int, int)
*/
public boolean isRenderable(int left, int top, int width, int height) {
return true;
}
/*
* (non-Javadoc)
*
* @see components.GmComponent#renderImage(java.awt.Graphics2D, int, int,
* int, int)
*/
public void renderImage(Graphics2D g2D, int left, int top, int width,
int height) {
g2D.drawImage(buffImage, 0, 0, width, height, left, top, left + width,
top + height, null);
//g2D.drawImage(buffImage,-left,-top,null);
//super.renderImage(g2D,left,top,width,height);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -