本文整理匯總了C#中net.sf.robocode.nio.ByteBuffer.putInt方法的典型用法代碼示例。如果您正苦於以下問題:C# ByteBuffer.putInt方法的具體用法?C# ByteBuffer.putInt怎麽用?C# ByteBuffer.putInt使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.sf.robocode.nio.ByteBuffer
的用法示例。
在下文中一共展示了ByteBuffer.putInt方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: serialize
public void serialize(RbSerializerN serializer, ByteBuffer buffer, object obje)
{
var obj = (RobotStatics) obje;
serializer.serialize(buffer, obj.robocodeVersion);
serializer.serialize(buffer, obj.isJuniorRobot);
serializer.serialize(buffer, obj.isInteractiveRobot);
serializer.serialize(buffer, obj.isPaintRobot);
serializer.serialize(buffer, obj.isAdvancedRobot);
serializer.serialize(buffer, obj.isTeamRobot);
serializer.serialize(buffer, obj.isTeamLeader);
serializer.serialize(buffer, obj.isDroid);
serializer.serialize(buffer, obj.isSentryRobot);
serializer.serialize(buffer, obj.name);
serializer.serialize(buffer, obj.shortName);
serializer.serialize(buffer, obj.veryShortName);
serializer.serialize(buffer, obj.fullClassName);
serializer.serialize(buffer, obj.shortClassName);
serializer.serialize(buffer, obj.battleRules.BattlefieldWidth);
serializer.serialize(buffer, obj.battleRules.BattlefieldHeight);
serializer.serialize(buffer, obj.battleRules.NumRounds);
serializer.serialize(buffer, obj.battleRules.GunCoolingRate);
serializer.serialize(buffer, obj.battleRules.InactivityTime);
serializer.serialize(buffer, obj.battleRules.HideEnemyNames);
serializer.serialize(buffer, obj.battleRules.SentryBorderSize);
if (obj.teammates != null)
{
foreach (string mate in obj.teammates)
{
serializer.serialize(buffer, mate);
}
}
buffer.putInt(-1);
serializer.serialize(buffer, obj.teamName);
serializer.serialize(buffer, obj.index);
serializer.serialize(buffer, obj.contestantIndex);
}