Package com.xebisco.yield.texture
Class TexturedRectangleMesh
java.lang.Object
com.xebisco.yield.AbstractBehavior
com.xebisco.yield.ComponentBehavior
com.xebisco.yield.AbstractRenderable
com.xebisco.yield.RectangleMesh
com.xebisco.yield.texture.TexturedRectangleMesh
- All Implemented Interfaces:
Behavior,Renderable,Closeable,AutoCloseable
A subclass of
RectangleMesh that adds the ability to apply a texture to the mesh.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidonStart()Called when the entity starts.voidRenders the behavior.setTexture(AbstractTexture texture) Sets the texture applied to the mesh.texture()Returns theAbstractTextureobject applied to the mesh.Methods inherited from class com.xebisco.yield.RectangleMesh
color, setColor, setSize, sizeMethods inherited from class com.xebisco.yield.AbstractRenderable
form, paintMethods inherited from class com.xebisco.yield.ComponentBehavior
application, close, component, component, entity, onCreate, onLateUpdate, onUpdate, renderIndex, setEntity, setRenderIndex, texture, texture, transformMethods inherited from class com.xebisco.yield.AbstractBehavior
frames, tick
-
Constructor Details
-
TexturedRectangleMesh
public TexturedRectangleMesh()Constructs a newTexturedRectangleMesh.
-
-
Method Details
-
onStart
public void onStart()Description copied from class:ComponentBehaviorCalled when the entity starts.- Specified by:
onStartin interfaceBehavior- Overrides:
onStartin classComponentBehavior
-
render
Description copied from class:ComponentBehaviorRenders the behavior.- Specified by:
renderin interfaceRenderable- Overrides:
renderin classRectangleMesh- Parameters:
renderer- The renderer.
-
texture
Returns theAbstractTextureobject applied to the mesh.- Returns:
- The texture applied to the mesh.
-
setTexture
Sets the texture applied to the mesh.- Parameters:
texture- The texture to apply to the mesh.- Returns:
- This instance of
TexturedRectangleMeshfor method chaining.
-