📄 diamond.java
字号:
import java.io.IOException;
import javax.microedition.lcdui.Image;
import javax.microedition.lcdui.game.Sprite;
/*
* Diamond.java
*
* Created on 2007年3月25日, 下午8:21
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
/**
*
* @author MissYou
*/
public class Diamond extends Target{
private static final int PERVALUE = 1000;
/** Creates a new instance of Stone */
public Diamond() {
super();
}
public Diamond( int x, int y, int size ) {
String filename = "/D" + String.valueOf(size) + ".png";
try{
super.setAll( x, y, size, new Sprite(Image.createImage(filename)) );
}catch( IOException ioe ){
System.out.println("Can't load Stone file.");
}
}
public int getRelValue(){
return getSize()*PERVALUE;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -