public abstract class TextureUnit extends Object
| Modifier and Type | Class | Description |
|---|---|---|
static class |
TextureUnit.ColorOperation |
Possible color operations.
|
static class |
TextureUnit.LayerBlendOperationEx |
Possible layer blend operations.
|
static class |
TextureUnit.LayerBlendSource |
Possible layer blend sources.
|
static class |
TextureUnit.TextureFilter |
Filter to apply on texture.
|
| Modifier | Constructor | Description |
|---|---|---|
protected |
TextureUnit() |
Protected constructor, only called from children.
|
| Modifier and Type | Method | Description |
|---|---|---|
abstract void |
scroll(float x,
float y) |
Set the unit animation scroll speed.
|
abstract void |
setAlphaOperation(TextureUnit.LayerBlendOperationEx operation,
TextureUnit.LayerBlendSource source1,
TextureUnit.LayerBlendSource source2) |
Set alpha operation.
|
abstract void |
setColorOperation(TextureUnit.ColorOperation op) |
Set the unit color operation.
|
abstract void |
setColorOperationEx(TextureUnit.LayerBlendOperationEx op,
TextureUnit.LayerBlendSource src1,
TextureUnit.LayerBlendSource src2) |
Set the unit color operation.
|
abstract void |
setColorOperationEx(TextureUnit.LayerBlendOperationEx op,
TextureUnit.LayerBlendSource source1,
TextureUnit.LayerBlendSource source2,
Color color) |
Set the unit color operation.
|
abstract void |
setCoordinateSet(int set) |
|
void |
setScale(float scale) |
Scale uniformly the texture.
|
void |
setScale(float xScale,
float yScale) |
Scale the texture.
|
protected abstract void |
setScaleImpl(float xScale,
float yScale) |
Call implementation to set the scale.
|
TextureUnit |
setTexture(String path) |
Set a new texture.
|
abstract TextureUnit |
setTextureAnimated(String basePath,
int numberOfFrames,
int duration) |
|
protected abstract void |
setTextureImpl(String path) |
Call implementation to set the texture.
|
protected TextureUnit()
public final TextureUnit setTexture(String path)
path - Image path.public abstract TextureUnit setTextureAnimated(String basePath, int numberOfFrames, int duration)
basePath - Image path, expected format is path/name.extension, and the
files will be path/nameX.extension, X being the image
number(0,1,...). i.e. for files img0.tga, img1.tga..., path is
img.tga.numberOfFrames - Number of frames to play.duration - Animation duration, in seconds.public abstract void setColorOperation(TextureUnit.ColorOperation op)
op - Color operation.public abstract void setColorOperationEx(TextureUnit.LayerBlendOperationEx op, TextureUnit.LayerBlendSource src1, TextureUnit.LayerBlendSource src2)
op - Color operation.src1 - Operation source 1.src2 - Operation source 2.public abstract void setColorOperationEx(TextureUnit.LayerBlendOperationEx op, TextureUnit.LayerBlendSource source1, TextureUnit.LayerBlendSource source2, Color color)
op - Color operation.source1 - Operation source 1.source2 - Operation source 2.color - Color to set.public abstract void scroll(float x,
float y)
x - Animation X speed.y - Animation Y speed.public final void setScale(float scale)
scale - Scale factor.public final void setScale(float xScale,
float yScale)
xScale - Scale factor for width.yScale - Scale factor for height.protected abstract void setScaleImpl(float xScale,
float yScale)
xScale - Width scale.yScale - Height scale.protected abstract void setTextureImpl(String path)
path - Image path.public abstract void setAlphaOperation(TextureUnit.LayerBlendOperationEx operation, TextureUnit.LayerBlendSource source1, TextureUnit.LayerBlendSource source2)
operation - Alpha operation.source1 - Operation source 1.source2 - Operation source 2.public abstract void setCoordinateSet(int set)
Copyright © 2014–2018. All rights reserved.