Merge pull request #5 from phspaelti/master

Added positive charge to Black Crystal
This commit is contained in:
Thomas Foote 2014-03-18 10:16:55 -04:00
commit 5db7d9b43f

View File

@ -13,40 +13,40 @@ public class BlackCrystal extends Crystal
{
public BlackCrystal(int X, int Y, Room r)
{
super(X,Y,r,0);
super(X,Y,r,10);
}
public void GenerateIcons()
{
icons = new ImageIcon[1];
icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR));
Graphics g;
Graphics2D g2;
Color transparent = new Color(0,0,0,0);
icons = new ImageIcon[1];
icons[0]= new ImageIcon(new BufferedImage(width,height,BufferedImage.TYPE_4BYTE_ABGR));
Graphics g;
Graphics2D g2;
Color transparent = new Color(0,0,0,0);
// 0 = blue
try
{
g = icons[0].getImage().getGraphics();
}
catch (NullPointerException e)
{
System.out.println("Could not get Graphics pointer to " + getClass() + " Image");
return;
}
g2 = (Graphics2D) g;
g2.setBackground(transparent);
g2.clearRect(0,0,width,height);
g.setColor(Color.black);
g.fillRect(12,0,4,24);
g.fillRect(8,4,12,16);
g.fillRect(4,6,20,12);
g.fillRect(0,10,28,4);
g.fillRect(0,4,4,2);
g.fillRect(0,18,4,2);
g.fillRect(24,4,4,2);
g.fillRect(24,18,4,2);
currentIcon = icons[0].getImage();
// 0 = blue
try
{
g = icons[0].getImage().getGraphics();
}
catch (NullPointerException e)
{
System.out.println("Could not get Graphics pointer to " + getClass() + " Image");
return;
}
g2 = (Graphics2D) g;
g2.setBackground(transparent);
g2.clearRect(0,0,width,height);
g.setColor(Color.black);
g.fillRect(12,0,4,24);
g.fillRect(8,4,12,16);
g.fillRect(4,6,20,12);
g.fillRect(0,10,28,4);
g.fillRect(0,4,4,2);
g.fillRect(0,18,4,2);
g.fillRect(24,4,4,2);
g.fillRect(24,18,4,2);
currentIcon = icons[0].getImage();
}
public void Decorate() {}