mirror of
https://github.com/inf112-v20/Fiasko.git
synced 2025-02-07 18:49:34 +01:00
Legger til manglende kommentarer i DrawableObject
This commit is contained in:
parent
45fdc036ea
commit
bd7897b2c2
@ -1,7 +1,9 @@
|
||||
package inf112.skeleton.app;
|
||||
|
||||
/**
|
||||
* This class represents an object that can be drawn using libgdx
|
||||
*/
|
||||
public class DrawableObject implements IDrawableObject {
|
||||
|
||||
private int xPos;
|
||||
private int yPos;
|
||||
private int width = 64;
|
||||
@ -11,6 +13,17 @@ public class DrawableObject implements IDrawableObject {
|
||||
private boolean flipX = false;
|
||||
private boolean flipY = false;
|
||||
|
||||
/**
|
||||
* Initializes a drawable object
|
||||
* @param xPos The pixel to start drawing on for the x axis
|
||||
* @param yPos The pixel to start drawing on for the y axis
|
||||
* @param texture The texture to use for drawing the element
|
||||
* @param rotation The amount of degrees to rotate the element counterclockwise
|
||||
* @param width The width of the element
|
||||
* @param height The height of the element
|
||||
* @param flipX Whether to flip/mirror the element over the x axis
|
||||
* @param flipY Whether to flip/mirror the element over the y axis
|
||||
*/
|
||||
public DrawableObject(int xPos, int yPos, GameTexture texture, int rotation, int width, int height, boolean flipX, boolean flipY) {
|
||||
this.xPos = xPos;
|
||||
this.yPos = yPos;
|
||||
@ -22,6 +35,12 @@ public class DrawableObject implements IDrawableObject {
|
||||
this.flipY = flipY;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a new drawable object
|
||||
* @param xPos The pixel to start drawing on for the x axis
|
||||
* @param yPos The pixel to start drawing on for the y axis
|
||||
* @param texture The texture to use for drawing the element
|
||||
*/
|
||||
public DrawableObject(int xPos, int yPos, GameTexture texture) {
|
||||
this.xPos = xPos;
|
||||
this.yPos = yPos;
|
||||
|
Loading…
x
Reference in New Issue
Block a user