S
- the generic type for the player's status.B
- the generic type of the builder to be returned upon invoking
builder methods.FxSpriteFactory<S>
, org.refcodes.checkerboard.SpriteFactory<Node,S,FxCheckerboardViewer<?,S>>
, org.refcodes.factory.ContextLookupFactory<IMG,S,CBV>
public abstract class AbstractFxSpriteFactory<S,B extends AbstractFxSpriteFactory<S,B>> extends Object implements FxSpriteFactory<S>
Constructor | Description |
---|---|
AbstractFxSpriteFactory() |
Modifier and Type | Method | Description |
---|---|---|
double |
getOpacity() |
Gets the opacity.
|
double |
getScaleFactor() |
Gets the scale factor.
|
protected static double |
getScaleX(Node aSprite,
FxCheckerboardViewer<?,?> aCheckerboard) |
Gets the scale X.
|
protected static double |
getScaleY(Node aSprite,
FxCheckerboardViewer<?,?> aCheckerboard) |
Gets the scale Y.
|
void |
setOpacity(double aOpacity) |
Sets the opacity.
|
void |
setScaleFactor(double aScaleFactor) |
Sets the scale factor.
|
protected <N extends Node> |
toInitNode(double aScale,
N aSprite,
FxCheckerboardViewer<?,?> aCheckerboard) |
Inits the sprite.
|
protected <N extends Node> |
toInitNode(N aSprite,
FxCheckerboardViewer<?,?> aCheckerboard) |
Inits the sprite.
|
B |
withOpacity(double aOpacity) |
With opacity.
|
B |
withScaleFactor(double aScaleFactor) |
With scale factor.
|
createInstance
public double getScaleFactor()
public void setScaleFactor(double aScaleFactor)
aScaleFactor
- the new scale factorpublic B withScaleFactor(double aScaleFactor)
aScaleFactor
- the scale factorpublic double getOpacity()
public void setOpacity(double aOpacity)
aOpacity
- the new opacitypublic B withOpacity(double aOpacity)
aOpacity
- the opacityprotected static double getScaleX(Node aSprite, FxCheckerboardViewer<?,?> aCheckerboard)
aSprite
- the spriteaCheckerboard
- the checkerboardprotected static double getScaleY(Node aSprite, FxCheckerboardViewer<?,?> aCheckerboard)
aSprite
- the spriteaCheckerboard
- the checkerboardprotected <N extends Node> N toInitNode(N aSprite, FxCheckerboardViewer<?,?> aCheckerboard)
N
- The type of the sprite to be used.aSprite
- the spriteaCheckerboard
- the checkerboardprotected <N extends Node> N toInitNode(double aScale, N aSprite, FxCheckerboardViewer<?,?> aCheckerboard)
N
- The type of the sprite to be used.aSprite
- the spriteaScale
- The scale between 0 and 1.aCheckerboard
- the checkerboard.Copyright © 2021. All rights reserved.