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