docs: document the Tiles class
git-svn-id: https://micropolis.googlecode.com/svn/trunk/micropolis-java@919 d9718cc8-9f43-0410-858b-315f434eb58c
This commit is contained in:
parent
a8710741d9
commit
bde6014165
1 changed files with 9 additions and 0 deletions
|
@ -12,6 +12,9 @@ import java.io.*;
|
||||||
import java.nio.charset.Charset;
|
import java.nio.charset.Charset;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides global methods for loading tile specifications.
|
||||||
|
*/
|
||||||
public class Tiles
|
public class Tiles
|
||||||
{
|
{
|
||||||
static final Charset UTF8 = Charset.forName("UTF-8");
|
static final Charset UTF8 = Charset.forName("UTF-8");
|
||||||
|
@ -76,6 +79,12 @@ public class Tiles
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Access a tile specification by index number.
|
||||||
|
*
|
||||||
|
* @return a tile specification, or null if there is no tile
|
||||||
|
* with the given number
|
||||||
|
*/
|
||||||
public static TileSpec get(int tileNumber)
|
public static TileSpec get(int tileNumber)
|
||||||
{
|
{
|
||||||
if (tileNumber >= 0 && tileNumber < tiles.length) {
|
if (tileNumber >= 0 && tileNumber < tiles.length) {
|
||||||
|
|
Reference in a new issue