📄 staticsprite.java
字号:
package zonja;
import java.io.DataInputStream;
import java.io.DataOutputStream;
public class StaticSprite extends ZonSprite {
public StaticSprite(int scrWidth, int scrHeight) {
super(scrWidth, scrHeight);
setRealSize(16, 16);
}
public boolean saveData(DataOutputStream dos){
if(!super.saveData(dos))
return false;
return true;
}
public boolean loadData(DataInputStream dis){
if(!super.loadData(dis))
return false;
return true;
}
private int frameCount = 0;
void mainAction() {
frameCount++;
if (offsetX < scrWidth && offsetX + frameWidth > 0){
isVisible = true;
} else {
isVisible = false;
}
if(frameCount % 2 == 0){
nextFrame();
frameCount = 0;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -