本文整理汇总了Java中net.sf.freecol.common.model.Tile.getId方法的典型用法代码示例。如果您正苦于以下问题:Java Tile.getId方法的具体用法?Java Tile.getId怎么用?Java Tile.getId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.freecol.common.model.Tile
的用法示例。
在下文中一共展示了Tile.getId方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AnimateMoveMessage
import net.sf.freecol.common.model.Tile; //导入方法依赖的package包/类
/**
* Create a new {@code AnimateMoveMessage} for the supplied unit and
* direction.
*
* @param unit The {@code Unit} to move.
* @param direction The {@code Direction} to move in.
*/
public AnimateMoveMessage(Unit unit, Tile oldTile, Tile newTile,
boolean appears) {
super(TAG, UNIT_TAG, unit.getId(),
NEW_TILE_TAG, newTile.getId(), OLD_TILE_TAG, oldTile.getId());
if (appears) {
appendChild((unit.isOnCarrier()) ? unit.getCarrier() : unit);
}
}
示例2: FirstContactMessage
import net.sf.freecol.common.model.Tile; //导入方法依赖的package包/类
/**
* Create a new {@code FirstContactMessage}.
*
* @param player The {@code Player} making contact.
* @param other The {@code Player} being contacted.
* @param tile An optional {@code Tile} to offer.
*/
public FirstContactMessage(Player player, Player other, Tile tile) {
super(TAG, PLAYER_TAG, player.getId(), OTHER_TAG, other.getId(),
TILE_TAG, (tile == null) ? null : tile.getId(),
CAMPS_TAG, ((other.isEuropean()) ? null
: String.valueOf(other.getSettlementCount())));
}
示例3: ClaimLandMessage
import net.sf.freecol.common.model.Tile; //导入方法依赖的package包/类
/**
* Create a new {@code ClaimLandMessage}.
*
* @param tile The {@code Tile} to claim.
* @param claimant The {@code Unit} or {@code Settlement}
* claiming the tile.
* @param price The price to pay for the tile, negative if stealing.
*/
public ClaimLandMessage(Tile tile, FreeColGameObject claimant, int price) {
super(TAG, TILE_TAG, tile.getId(), CLAIMANT_TAG, claimant.getId(),
PRICE_TAG, String.valueOf(price));
}
示例4: NewRegionNameMessage
import net.sf.freecol.common.model.Tile; //导入方法依赖的package包/类
/**
* Create a new {@code NewRegionNameMessage} with the
* supplied name.
*
* @param region The {@code Region} being discovered.
* @param tile The {@code Tile} where the region is discovered.
* @param unit The {@code Unit} that discovers the region.
* @param newRegionName The default new region name.
*/
public NewRegionNameMessage(Region region, Tile tile, Unit unit,
String newRegionName) {
super(TAG, REGION_TAG, region.getId(), TILE_TAG, tile.getId(),
UNIT_TAG, unit.getId(), NEW_REGION_NAME_TAG, newRegionName);
}