public class FileParser
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
DBIdNormalAttack |
static int |
DBIdNormalItem |
static int |
DBIdPlayer |
static int |
DBIdRainyAttack |
static int |
DBIdRainyEnemy |
static int |
DBIdRainyItem |
static int |
DBIdSnowyAttack |
static int |
DBIdSnowyEnemy |
static int |
DBIdSnowyItem |
static int |
DBIdSunnyAttack |
static int |
DBIdSunnyEnemy |
static int |
DBIdSunnyItem |
Constructor and Description |
---|
FileParser() |
Modifier and Type | Method and Description |
---|---|
static int |
getDBIdEnemy()
returns the id of the enemy object in the database depeding on the weatherstate
|
static int |
getDBIdSpecialAttack()
returns the id of the attacks object in the database depeding on the weatherstate
|
static int |
getDBIdSpecialItem()
returns the id of the item object in the database depeding on the weatherstate
|
static int |
getNumTilesH() |
static int |
getNumTilesV() |
static GameState |
init(android.content.Context context,
WeatherStatus status)
used to fill the database and read the game config file
should be called before the level is created
|
static GameState |
initFromJSON(android.content.Context context)
Initialises the game from the game config file
|
static void |
loadWorld(android.content.Context context,
GameWorld world)
Loads the game world specified in test level
|
public static int DBIdNormalAttack
public static int DBIdSunnyAttack
public static int DBIdRainyAttack
public static int DBIdSnowyAttack
public static int DBIdPlayer
public static int DBIdNormalItem
public static int DBIdSunnyItem
public static int DBIdRainyItem
public static int DBIdSnowyItem
public static int DBIdSunnyEnemy
public static int DBIdRainyEnemy
public static int DBIdSnowyEnemy
public static GameState init(android.content.Context context, WeatherStatus status)
context
- the games contextstatus
- the weatherstatus according to which the objects are initialisedpublic static GameState initFromJSON(android.content.Context context)
context
- the android context to get access to the resource filespublic static void loadWorld(android.content.Context context, GameWorld world)
context
- the android context to get access to the resource filesworld
- the world to fill with objectspublic static int getNumTilesH()
public static int getNumTilesV()
public static int getDBIdSpecialAttack()
public static int getDBIdSpecialItem()
public static int getDBIdEnemy()