📄 tile.java
字号:
/*
* Tile.java
*
* Created on 28 November 2006, 22:36
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/
package wpc.data;
import java.awt.Color;
/**
*
* @author willis
*/
public class Tile {
private Color tileColor;
wpc.MainFrame mainFrame;
/** Creates a new instance of Tile */
public Tile(int height, wpc.MainFrame mainFrame){
this.mainFrame = mainFrame;
calcColor(height);
}
public Color getColor(){
return tileColor;
}
public int getColorInt(){
return tileColor.getRGB();
}
private void calcColor(int height){
if (height<mainFrame.getSeaLevel()){
tileColor = new Color(0,0,200);
}else if (height>mainFrame.getMountainLevel()){
tileColor = new Color(height,height,height);
}else{
tileColor = new Color(0,height,0);
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -