?? trace.java
字號:
package skyrocket;
import java.awt.Color;
import java.awt.Graphics2D;
class Trace extends Thing {
double velocityX, velocityY;
Trace( Thing thing ) {
super( thing.canvas );
this.color = thing.color;
this.width = thing.width;
this.height = thing.height;
stateX = thing.stateX;
stateY = thing.stateY;
}
void draw( Graphics2D g, int time ) {
g.fillRect( (int)stateX, (int)stateY, width, height );
color = new Color(
(int) ( color.getRed() * canvas.traceDarkerFactor ),
(int) ( color.getGreen() * canvas.traceDarkerFactor ),
(int) ( color.getBlue() * canvas.traceDarkerFactor )
);
if( color.getRed() + color.getGreen() + color.getBlue() < 10 )
stateDead = true;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -