📄 gamepanel.java
字号:
import javax.microedition.lcdui.Graphics;
public class GamePanel
{
public static final int WIDTH = 12;
public static final int HEIGHT = 15;
private final int SCREEN_WIDTH = 240;
private final int SCREEN_HEIGHT = 291;
private Shape shape;
private Ground ground;
private void paint(Graphics g)
{
System.out.println("paint...");
g.setColor(0x808080);
g.fillRect(0,0,SCREEN_WIDTH,SCREEN_HEIGHT);
shape.paint(g);
ground.paint(g);
}
public void display(Graphics g, Shape shape, Ground ground)
{
if(shape != null && ground != null)
{
this.shape = shape;
this.ground = ground;
paint(g);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -