public class MapTileGroupModel extends Object implements MapTileGroup
Modifier and Type | Field and Description |
---|---|
static String |
NO_GROUP_NAME
No group name.
|
Constructor and Description |
---|
MapTileGroupModel()
Create a map tile group.
|
MapTileGroupModel(Services services)
Create a map tile group.
|
Modifier and Type | Method and Description |
---|---|
void |
changeGroup(Tile tile,
String group)
Change the group of the tile.
|
String |
getGroup(Integer sheet,
int number)
Get the group name from the sheet and number value.
|
Collection<TileRef> |
getGroup(String name)
Get the tiles from group name.
|
String |
getGroup(Tile tile)
Get the group name of the tile.
|
String |
getGroup(TileRef tile)
Get the group name of the tile.
|
Collection<String> |
getGroups()
Get the groups list.
|
Media |
getGroupsConfig()
Get the groups configuration media file.
|
TileGroupType |
getType(String name)
Get the group type from its name.
|
TileGroupType |
getType(Tile tile)
Get the group type from a tile.
|
void |
loadGroups(Media groupsConfig)
Load tiles group from an external file.
|
public static final String NO_GROUP_NAME
public MapTileGroupModel()
public MapTileGroupModel(Services services)
services
- The services reference.public void loadGroups(Media groupsConfig)
MapTileGroup
loadGroups
in interface MapTileGroup
groupsConfig
- The tile collision groups descriptor.public void changeGroup(Tile tile, String group)
MapTileGroup
changeGroup
in interface MapTileGroup
tile
- The tile to change its group.group
- The group destination name (null
to simply remove).public Media getGroupsConfig()
MapTileGroup
getGroupsConfig
in interface MapTileGroup
public Collection<TileRef> getGroup(String name)
MapTileGroup
getGroup
in interface MapTileGroup
name
- The group name.public String getGroup(TileRef tile)
MapTileGroup
getGroup
in interface MapTileGroup
tile
- The tile reference.public String getGroup(Tile tile)
MapTileGroup
getGroup
in interface MapTileGroup
tile
- The tile reference.public String getGroup(Integer sheet, int number)
MapTileGroup
getGroup
in interface MapTileGroup
sheet
- The sheet number.number
- The tile number on sheet.public TileGroupType getType(String name)
MapTileGroup
getType
in interface MapTileGroup
name
- The group name.public TileGroupType getType(Tile tile)
MapTileGroup
getType
in interface MapTileGroup
tile
- The tile reference.public Collection<String> getGroups()
MapTileGroup
getGroups
in interface MapTileGroup
Copyright © 2016 Byron 3D Games Studio. All rights reserved.