blob: 68e52b62b430963d0e936be9fe90f937745b1363 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
//glowing block of color c (jfx node)
package gameplay;
import javafx.scene.effect.BlurType;
import javafx.scene.effect.DropShadow;
import javafx.scene.paint.Color;
import javafx.scene.shape.Rectangle;
public class Block extends Rectangle
{
public Block(Color c, double a, double b, int r)
{
super();
DropShadow dropShadow = new DropShadow();
dropShadow.setRadius(200.0);
dropShadow.setColor(c);
dropShadow.setBlurType(BlurType.GAUSSIAN);
super.setFill(c);
super.setWidth(a);
super.setHeight(b);
super.setArcHeight(r);
super.setArcWidth(r);
super.setEffect(dropShadow);
}
}
|