aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/net/sowgro/npehero/gameplay/Block.java
blob: 5bc9d9cd0c77d2987987a58c5cabec526b11a5f1 (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 net.sowgro.npehero.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);
    }
}