当前位置: 首页>>代码示例>>C#>>正文


C# ByteBuffer.put方法代码示例

本文整理汇总了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";
 }
开发者ID:NotBobTheBuilder,项目名称:robocode,代码行数:7,代码来源:GraphicsProxy.cs

示例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);
            }
开发者ID:EamonnACI,项目名称:ACI-SpaceRace,代码行数:48,代码来源:ExecCommands.cs

示例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);
            }
开发者ID:vodkhang,项目名称:RoboCode-Robots,代码行数:27,代码来源:ExecResults.cs


注:本文中的net.sf.robocode.nio.ByteBuffer.put方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。