Class Rectangle
java.lang.Object
fr.r1r0r0.deltaengine.model.sprites.shapes.Shape
fr.r1r0r0.deltaengine.model.sprites.shapes.Rectangle
- All Implemented Interfaces:
Sprite
public class Rectangle extends Shape
Rectangle Sprite
-
Field Summary
Fields Modifier and Type Field Description private javafx.scene.shape.Rectangle
fxRectangle
-
Constructor Summary
-
Method Summary
Modifier and Type Method Description javafx.scene.shape.Shape
getFXShape()
more often than not, Javafx is used for shapesvoid
resize(double width, double height)
resize the sprite to the following width and heightvoid
setColor(Color color)
set the color of the RectangleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
fxRectangle
private final javafx.scene.shape.Rectangle fxRectangle
-
-
Constructor Details
-
Rectangle
Instantiate the Rectangle Sprite- Parameters:
color
- of the Rectangle
-
Rectangle
Instantiate the Rectangle Sprite- Parameters:
width
- of the Rectangleheight
- of the Rectanglecolor
- of the Rectangle
-
-
Method Details
-
setColor
set the color of the Rectangle- Parameters:
color
- the new color of the Rectangle
-
getFXShape
public javafx.scene.shape.Shape getFXShape()Description copied from class:Shape
more often than not, Javafx is used for shapes- Specified by:
getFXShape
in classShape
- Returns:
- the javafx shape used if any
-
resize
public void resize(double width, double height)Description copied from interface:Sprite
resize the sprite to the following width and height
-