?? gold.java
字號:
import java.awt.*;
public class gold{
private int xPos, yPos;
private Rectangle Gold;
private int goldSpecies;
public gold(int a, int b, int c){
xPos = a;
yPos = b;
goldSpecies = c;
Gold = new Rectangle(xPos - 2, yPos - 2, 5, 5);
}
public void draw(Graphics g){
g.setColor(Color.yellow);
if(goldSpecies == 1)
g.fillOval(xPos - 2, yPos - 2, 4, 4);
if(goldSpecies == 2)
g.fillOval(xPos - 4, yPos - 4, 9, 9);
}
public Rectangle getBorder(){
return Gold;
}
public boolean bigGold(){
return goldSpecies == 2;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -