本文整理了Java中com.cardshifter.modapi.cards.ZoneComponent.size()
方法的一些代码示例,展示了ZoneComponent.size()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZoneComponent.size()
方法的具体详情如下:
包路径:com.cardshifter.modapi.cards.ZoneComponent
类名称:ZoneComponent
方法名:size
暂无
代码示例来源:origin: Cardshifter/Cardshifter
@Override
public String toString() {
return "Zone '" + name + "' [size=" + size() + ", owner=" + owner
+ ", known=" + known + ", publicKnown=" + publicKnown + "]";
}
代码示例来源:origin: Cardshifter/Cardshifter
private void drawCard(DrawCardEvent event) {
if (event.getToZone().size() >= limit) {
event.setCancelled(true);
actionWhenFull.accept(event);
}
}
代码示例来源:origin: Cardshifter/Cardshifter
/**
* Zones are treated differently when they are known to the target player.
*
* @param zone The zone component object
* @param player The target player for the message
* @return A zone message constructed based on the zone component object properties.
*/
private ZoneMessage constructZoneMessage(ZoneComponent zone, Entity player) {
return new ZoneMessage(zone.getZoneId(), zone.getName(),
zone.getOwner().getId(), zone.size(), zone.isKnownTo(player), zone.stream().mapToInt(e -> e.getId()).toArray());
}
内容来源于网络,如有侵权,请联系作者删除!