本文整理匯總了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);
}