• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# RbSerializerN类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中RbSerializerN的典型用法代码示例。如果您正苦于以下问题:C# RbSerializerN类的具体用法?C# RbSerializerN怎么用?C# RbSerializerN使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



RbSerializerN类属于命名空间,在下文中一共展示了RbSerializerN类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: sizeOf

            public int sizeOf(RbSerializerN serializer, Object obje)
            {
                var obj = (BulletStatus) obje;

                return RbSerializerN.SIZEOF_TYPEINFO + RbSerializerN.SIZEOF_INT + serializer.sizeOf(obj.victimName)
                       + RbSerializerN.SIZEOF_BOOL + 2*RbSerializerN.SIZEOF_DOUBLE;
            }
开发者ID:EamonnACI,项目名称:ACI-SpaceRace,代码行数:7,代码来源:BulletStatus.cs


示例2: serialize

            public void serialize(RbSerializerN serializer, ByteBuffer buffer, Object obje)
            {
                var obj = (DebugProperty) obje;

                serializer.serialize(buffer, obj.key);
                serializer.serialize(buffer, obj.value);
            }
开发者ID:khangnguyen,项目名称:robocode,代码行数:7,代码来源:DebugProperty.cs


示例3: deserialize

            public Object deserialize(RbSerializerN serializer, ByteBuffer buffer)
            {
                String key = serializer.deserializeString(buffer);
                String value = serializer.deserializeString(buffer);

                return new DebugProperty(key, value);
            }
开发者ID:khangnguyen,项目名称:robocode,代码行数:7,代码来源:DebugProperty.cs


示例4: serialize

            public void serialize(RbSerializerN serializer, ByteBuffer buffer, Object obje)
            {
                var obj = (TeamMessage) obje;

                serializer.serialize(buffer, obj.sender);
                serializer.serialize(buffer, obj.recipient);
                serializer.serialize(buffer, obj.message);
            }
开发者ID:jaros,项目名称:robocode,代码行数:8,代码来源:TeamMessage.cs


示例5: deserialize

            public Object deserialize(RbSerializerN serializer, ByteBuffer buffer)
            {
                String sender = serializer.deserializeString(buffer);
                String recipient = serializer.deserializeString(buffer);
                byte[] message = serializer.deserializeBytes(buffer);

                return new TeamMessage(sender, recipient, message);
            }
开发者ID:jaros,项目名称:robocode,代码行数:8,代码来源:TeamMessage.cs


示例6: serialize

            public void serialize(RbSerializerN serializer, ByteBuffer buffer, Object obje)
            {
                var obj = (BulletCommand) obje;

                serializer.serialize(buffer, obj.power);
                serializer.serialize(buffer, obj.fireAssistValid);
                serializer.serialize(buffer, obj.fireAssistAngle);
                serializer.serialize(buffer, obj.bulletId);
            }
开发者ID:markthor,项目名称:robocode,代码行数:9,代码来源:BulletCommand.cs


示例7: deserialize

            public Object deserialize(RbSerializerN serializer, ByteBuffer buffer)
            {
                double power = buffer.getDouble();
                bool fireAssistValid = serializer.deserializeBoolean(buffer);
                double fireAssistAngle = buffer.getDouble();
                int bulletId = buffer.getInt();

                return new BulletCommand(power, fireAssistValid, fireAssistAngle, bulletId);
            }
开发者ID:markthor,项目名称:robocode,代码行数:9,代码来源:BulletCommand.cs


示例8: sizeOf

            public int sizeOf(RbSerializerN serializer, Object obje)
            {
                var obj = (TeamMessage) obje;
                int s = serializer.sizeOf(obj.sender);
                int r = serializer.sizeOf(obj.recipient);
                int m = serializer.sizeOf(obj.message);

                return RbSerializerN.SIZEOF_TYPEINFO + s + r + m;
            }
开发者ID:jaros,项目名称:robocode,代码行数:9,代码来源:TeamMessage.cs


示例9: serialize

 public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
 {
     var obj = (KeyPressedEvent) objec;
     serializer.serialize(buffer, obj.KeyChar);
     serializer.serialize(buffer, obj.KeyCode);
     serializer.serialize(buffer, obj.KeyLocation);
     serializer.serialize(buffer, obj.ID);
     serializer.serialize(buffer, obj.ModifiersEx);
     serializer.serialize(buffer, obj.When);
 }
开发者ID:EamonnACI,项目名称:ACI-SpaceRace,代码行数:10,代码来源:KeyPressedEvent.cs


示例10: deserialize

            public Object deserialize(RbSerializerN serializer, ByteBuffer buffer)
            {
                int bulletId = buffer.getInt();
                String victimName = serializer.deserializeString(buffer);
                bool isActive = serializer.deserializeBoolean(buffer);
                double x = buffer.getDouble();
                double y = buffer.getDouble();

                return new BulletStatus(bulletId, x, y, victimName, isActive);
            }
开发者ID:EamonnACI,项目名称:ACI-SpaceRace,代码行数:10,代码来源:BulletStatus.cs


示例11: serialize

            public void serialize(RbSerializerN serializer, ByteBuffer buffer, Object obje)
            {
                var obj = (BulletStatus) obje;

                serializer.serialize(buffer, obj.bulletId);
                serializer.serialize(buffer, obj.victimName);
                serializer.serialize(buffer, obj.isActive);
                serializer.serialize(buffer, obj.x);
                serializer.serialize(buffer, obj.y);
            }
开发者ID:EamonnACI,项目名称:ACI-SpaceRace,代码行数:10,代码来源:BulletStatus.cs


示例12: deserialize

 public object deserialize(RbSerializerN serializer, ByteBuffer buffer)
 {
     char keyChar = buffer.getChar();
     int keyCode = buffer.getInt();
     int keyLocation = buffer.getInt();
     int id = buffer.getInt();
     int modifiersEx = buffer.getInt();
     long when = buffer.getLong();
     return new KeyPressedEvent(keyChar, keyCode, keyLocation, id, modifiersEx, when);
 }
开发者ID:EamonnACI,项目名称:ACI-SpaceRace,代码行数:10,代码来源:KeyPressedEvent.cs


示例13: serialize

            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (MouseClickedEvent) objec;

                serializer.serialize(buffer, obj.Button);
                serializer.serialize(buffer, obj.ClickCount);
                serializer.serialize(buffer, obj.X);
                serializer.serialize(buffer, obj.Y);
                serializer.serialize(buffer, obj.ID);
                serializer.serialize(buffer, obj.ModifiersEx);
                serializer.serialize(buffer, obj.When);
            }
开发者ID:khangnguyen,项目名称:robocode,代码行数:12,代码来源:MouseClickedEvent.cs


示例14: BasicRobotProxy

        public BasicRobotProxy(IRobotItem specification, IHostManager hostManager, IRobotPeer peer, RobotStatics statics)
            : base(specification, hostManager, peer, statics)
        {
            eventManager = new EventManager(this);

            graphicsProxy = new GraphicsProxy();

            // dummy
            execResults = new ExecResults(null, null, null, null, null, false, false, false);

            setSetCallCount(0);
            setGetCallCount(0);

            var sharedBuffer = new byte[10*1024*100];
            execJavaBuffer = new DirectByteBuffer(sharedBuffer);
            execNetBuffer = ByteBuffer.wrap(sharedBuffer);
            rbSerializerN = new RbSerializerN();
            this.peer.setupBuffer(execJavaBuffer);
        }
开发者ID:Inzaghi2012,项目名称:robocode,代码行数:19,代码来源:BasicRobotProxy.cs


示例15: deserialize

            public object deserialize(RbSerializerN serializer, ByteBuffer buffer)
            {
                string name = serializer.deserializeString(buffer);
                double energy = buffer.getDouble();
                double heading = buffer.getDouble();
                double bearing = buffer.getDouble();
                double distance = buffer.getDouble();
                double velocity = buffer.getDouble();
                bool isSentryRobot = serializer.deserializeBoolean(buffer);

                return new ScannedRobotEvent(name, energy, bearing, distance, heading, velocity, isSentryRobot);
            }
开发者ID:markthor,项目名称:robocode,代码行数:12,代码来源:ScannedRobotEvent.cs


示例16: sizeOf

            public int sizeOf(RbSerializerN serializer, object objec)
            {
                var obj = (ScannedRobotEvent) objec;

                return RbSerializerN.SIZEOF_TYPEINFO + serializer.sizeOf(obj.name) + 5 * RbSerializerN.SIZEOF_DOUBLE + RbSerializerN.SIZEOF_BOOL;
            }
开发者ID:markthor,项目名称:robocode,代码行数:6,代码来源:ScannedRobotEvent.cs


示例17: serialize

            public void serialize(RbSerializerN serializer, ByteBuffer buffer, object objec)
            {
                var obj = (ScannedRobotEvent) objec;

                serializer.serialize(buffer, obj.name);
                serializer.serialize(buffer, obj.energy);
                serializer.serialize(buffer, obj.heading);
                serializer.serialize(buffer, obj.bearing);
                serializer.serialize(buffer, obj.distance);
                serializer.serialize(buffer, obj.velocity);
                serializer.serialize(buffer, obj.isSentryRobot);
            }
开发者ID:markthor,项目名称:robocode,代码行数:12,代码来源:ScannedRobotEvent.cs


示例18: deserialize

            public object deserialize(RbSerializerN serializer, ByteBuffer buffer)
            {
                int clickCount = buffer.getInt();
                int x = buffer.getInt();
                int y = buffer.getInt();
                int scrollType = buffer.getInt();
                int scrollAmount = buffer.getInt();
                int wheelRotation = buffer.getInt();
                int id = buffer.getInt();
                int modifiersEx = buffer.getInt();
                long when = buffer.getLong();

                return new MouseWheelMovedEvent(clickCount, x, y, scrollType, scrollAmount, wheelRotation, id,
                                                modifiersEx, when);
            }
开发者ID:EamonnACI,项目名称:ACI-SpaceRace,代码行数:15,代码来源:MouseWheelMovedEvent.cs


示例19: sizeOf

 public int sizeOf(RbSerializerN serializer, object objec)
 {
     return RbSerializerN.SIZEOF_TYPEINFO + 8*RbSerializerN.SIZEOF_INT + RbSerializerN.SIZEOF_LONG;
 }
开发者ID:EamonnACI,项目名称:ACI-SpaceRace,代码行数:4,代码来源:MouseWheelMovedEvent.cs


示例20: deserialize

            public object deserialize(RbSerializerN serializer, ByteBuffer buffer)
            {
                string name = serializer.deserializeString(buffer);

                return new RobotDeathEvent(name);
            }
开发者ID:hgzapata,项目名称:robocode,代码行数:6,代码来源:RobotDeathEvent.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ReactiveCommand类代码示例发布时间:2022-05-24
下一篇:
C# RazorError类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap