Skip to content

Commit 70b6d2b

Browse files
committed
Added some Javadoc comments for types of tiles
1 parent 39a34d4 commit 70b6d2b

File tree

3 files changed

+26
-0
lines changed

3 files changed

+26
-0
lines changed

src/com/redomar/game/level/tiles/AnimatedTile.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,14 @@ public class AnimatedTile extends BasicTile {
77
private long lastIterationTime;
88
private int animationSwitchDelay;
99

10+
/**
11+
*
12+
* @param id Unique ID for the Tile
13+
* @param animationCoords A 2D array of all x,y-coordinates in Integers.
14+
* @param tileColour Colours from the SpriteSheet.
15+
* @param levelColour Colours to be displayed in the Game World.
16+
* @param animationSwitchDelay Length of time to be delayed to the next frame from the 2D array.
17+
*/
1018
public AnimatedTile(int id, int[][] animationCoords, int tileColour,
1119
int levelColour, int animationSwitchDelay) {
1220
super(id, animationCoords[0][0], animationCoords[0][1], tileColour,

src/com/redomar/game/level/tiles/BasicSolidTile.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
public class BasicSolidTile extends BasicTile {
44

5+
/**
6+
* This is a solid tile, but does not emit any light. This tile does not have any animations.
7+
*
8+
* @param id Unique ID for the Tile
9+
* @param x Specifies the x-coordinate from the SpriteSheet, measured in 8 pixels. Must be 0 - 31
10+
* @param y Specifies the y-coordinate from the SpriteSheet, measured in 8 pixels. Must be 0 - 31
11+
* @param tileColour Colours from the SpriteSheet.
12+
* @param levelColour Colours to be displayed in the Game World.
13+
*/
514
public BasicSolidTile(int id, int x, int y, int tileColour, int levelColour) {
615
super(id, x, y, tileColour, levelColour);
716
this.solid = true;

src/com/redomar/game/level/tiles/BasicTile.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ public class BasicTile extends Tile {
88
protected int tileId;
99
protected int tileColour;
1010

11+
/**
12+
* This is a tile that does not emit light, nor is sold. This tile does not have any animations.
13+
*
14+
* @param id Unique ID for the Tile
15+
* @param x Specifies the x-coordinate from the SpriteSheet, measured in 8 pixels. Must be 0 - 31
16+
* @param y Specifies the y-coordinate from the SpriteSheet, measured in 8 pixels. Must be 0 - 31
17+
* @param tileColour Colours from the SpriteSheet.
18+
* @param levelColour Colours to be displayed in the Game World.
19+
*/
1120
public BasicTile(int id, int x, int y, int tileColour, int levelColour) {
1221
super(id, false, false, levelColour);
1322

0 commit comments

Comments
 (0)