本文整理汇总了C#中net.sf.robocode.nio.ByteBuffer.put方法的典型用法代码示例。如果您正苦于以下问题:C# ByteBuffer.put方法的具体用法?C# ByteBuffer.put怎么用?C# ByteBuffer.put使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.sf.robocode.nio.ByteBuffer
的用法示例。
在下文中一共展示了ByteBuffer.put方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GraphicsProxy
public GraphicsProxy()
{
calls = ByteBuffer.allocate(INITIAL_BUFFER_SIZE);
calls.order(ByteOrder.LITTLE_ENDIAN);
calls.put(calls.order() == ByteOrder.BIG_ENDIAN ? (byte) 1 : (byte) 0);
isDebugging = java.lang.System.getProperty("debug", "false") == "true";
}
示例2: serialize
public void serialize(RbSerializerN serializer, ByteBuffer buffer, Object obje)
{
var obj = (ExecCommands) obje;
serializer.serialize(buffer, obj.bodyTurnRemaining);
serializer.serialize(buffer, obj.radarTurnRemaining);
serializer.serialize(buffer, obj.gunTurnRemaining);
serializer.serialize(buffer, obj.distanceRemaining);
serializer.serialize(buffer, obj.isAdjustGunForBodyTurn);
serializer.serialize(buffer, obj.isAdjustRadarForGunTurn);
serializer.serialize(buffer, obj.isAdjustRadarForBodyTurn);
serializer.serialize(buffer, obj.isAdjustRadarForBodyTurnSet);
serializer.serialize(buffer, obj.bodyColor);
serializer.serialize(buffer, obj.gunColor);
serializer.serialize(buffer, obj.radarColor);
serializer.serialize(buffer, obj.scanColor);
serializer.serialize(buffer, obj.bulletColor);
serializer.serialize(buffer, obj.maxTurnRate);
serializer.serialize(buffer, obj.maxVelocity);
serializer.serialize(buffer, obj.moved);
serializer.serialize(buffer, obj.scan);
serializer.serialize(buffer, obj.isIORobot);
serializer.serialize(buffer, obj.isTryingToPaint);
serializer.serialize(buffer, obj.outputText);
serializer.serialize(buffer, obj.graphicsCalls);
foreach (BulletCommand bullet in obj.bullets)
{
serializer.serialize(buffer, RbSerializerN.BulletCommand_TYPE, bullet);
}
buffer.put(RbSerializerN.TERMINATOR_TYPE);
foreach (TeamMessage message in obj.teamMessages)
{
serializer.serialize(buffer, RbSerializerN.TeamMessage_TYPE, message);
}
buffer.put(RbSerializerN.TERMINATOR_TYPE);
foreach (DebugProperty prop in obj.debugProperties)
{
serializer.serialize(buffer, RbSerializerN.DebugProperty_TYPE, prop);
}
buffer.put(RbSerializerN.TERMINATOR_TYPE);
}
示例3: serialize
public void serialize(RbSerializerN serializer, ByteBuffer buffer, Object obje)
{
var obj = (ExecResults) obje;
serializer.serialize(buffer, obj.halt);
serializer.serialize(buffer, obj.shouldWait);
serializer.serialize(buffer, obj.paintEnabled);
serializer.serialize(buffer, RbSerializerN.ExecCommands_TYPE, obj.commands);
serializer.serialize(buffer, RbSerializerN.RobotStatus_TYPE, obj.status);
foreach (Event evnt in obj.events)
{
serializer.serialize(buffer, evnt);
}
buffer.put(RbSerializerN.TERMINATOR_TYPE);
foreach (TeamMessage message in obj.teamMessages)
{
serializer.serialize(buffer, RbSerializerN.TeamMessage_TYPE, message);
}
buffer.put(RbSerializerN.TERMINATOR_TYPE);
foreach (BulletStatus bulletStatus in obj.bulletUpdates)
{
serializer.serialize(buffer, RbSerializerN.BulletStatus_TYPE, bulletStatus);
}
buffer.put(RbSerializerN.TERMINATOR_TYPE);
}