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