本文整理汇总了Java中com.laytonsmith.core.constructs.CDouble类的典型用法代码示例。如果您正苦于以下问题:Java CDouble类的具体用法?Java CDouble怎么用?Java CDouble使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CDouble类属于com.laytonsmith.core.constructs包,在下文中一共展示了CDouble类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: exec
import com.laytonsmith.core.constructs.CDouble; //导入依赖的package包/类
@Override
public Construct exec(Target t, Environment environment, Construct... args) throws ConfigRuntimeException {
MCDynmapMarker marker = CHDynmapStatic.getMarker(args[0].val(), args[1].val(), t);
MCDynmapMarkerFillStyle fillStyle;
switch (marker.getType()) {
case AREA:
fillStyle = ((MCDynmapAreaMarker) marker).getFillStyle();
break;
case CIRCLE:
fillStyle = ((MCDynmapCircleMarker) marker).getFillStyle();
break;
default:
throw new ConfigRuntimeException("There is no existing area or circle markers with this id.", ExceptionType.NotFoundException, t);
}
CArray styleArray = new CArray(t);
styleArray.set("color", ObjectGenerator.GetGenerator().color(fillStyle.getColor(), t), t);
styleArray.set("opacity", new CDouble(fillStyle.getOpacity(), t), t);
return styleArray;
}
示例2: exec
import com.laytonsmith.core.constructs.CDouble; //导入依赖的package包/类
public Construct exec(Target t, Environment environment, Construct... args) throws ConfigRuntimeException {
return new CDouble(CHMIDISequencerManager.getSequencer(args[0].val(), t).getMIDISequencer().getTempoInBPM(), t);
}