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


C# IDataReader.ReadInt32方法代码示例

本文整理汇总了C#中IDataReader.ReadInt32方法的典型用法代码示例。如果您正苦于以下问题:C# IDataReader.ReadInt32方法的具体用法?C# IDataReader.ReadInt32怎么用?C# IDataReader.ReadInt32使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IDataReader的用法示例。


在下文中一共展示了IDataReader.ReadInt32方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: doHandleMessage

 public override void doHandleMessage(IDataReader msg)
 {
     XnaScrapId msgId = new XnaScrapId(msg);
     if (msgId.Equals(CHANGE_SCALE_MSG_ID))
     {
         m_scale.X = (float)msg.ReadInt32();
         m_scale.Y = (float)msg.ReadInt32();
         OnChanged();
     }
     base.doHandleMessage(msg);
 }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:11,代码来源:StaticScale2D.cs

示例2: InputContext

        public InputContext(IDataReader state, IInputManager inputManager, Core core)
            : base(state)
        {
            m_lastKeybaord = state.ReadBoolean();
            m_lastMouse = state.ReadBoolean();
            m_lastTouch = state.ReadBoolean();
            m_lastGamepad = state.ReadBoolean();

            Enum.TryParse(state.ReadString(), out m_playerIndex);
            // keyboard
            int numInputMappings = state.ReadInt32();
            for (int i = 0; i < numInputMappings; ++i)
            {
                String key = state.ReadString();
                Keys k;
                if (Enum.TryParse(key, true, out k))
                {
                    m_keyMappings.Add(k, new InputMapping(state, core));
                }
                else
                {
                    new InputMapping(state,core);
                }
            }

            //gamepad
            int numGamepadBindings = state.ReadInt32();
            for (int i = 0; i < numGamepadBindings; ++i)
            {
                String button = state.ReadString();
                Buttons b;
                if (Enum.TryParse(button,true,out b))
                {
                    m_gamepadMappings.Add(b, new InputMapping(state, core));
                }
                else
                {
                    new InputMapping(state, core);
                }
            }

            m_inputManager = inputManager;
        }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:43,代码来源:InputContext.cs

示例3: AbstractCollider

 public AbstractCollider(IDataReader state)
     : base(state)
 {
     m_collisionGroupId = new XnaScrapId(state);
     int numCollisionGroups = state.ReadInt32();
     for (int i = 0; i < numCollisionGroups; ++i)
     {
         m_collisionGroupIds.Add( new XnaScrapId(state));
     }
     m_relativePos.X = state.ReadSingle();
     m_relativePos.Y = state.ReadSingle();
     m_relativePos.Z = state.ReadSingle();
 }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:13,代码来源:AbstractCollider.cs

示例4: doHandleMessage

 public override void doHandleMessage(IDataReader msg)
 {
     msg.BaseStream.Position = 0;
     XnaScrapId msgId = new XnaScrapId(msg);
     if (msgId == CHANGE_VISIBILITY_MSG_ID)
     {
         Visible = msg.ReadBoolean();
     }
     if (msgId == CHANGE_LAYER_MSG_ID)
     {
         Layer = msg.ReadInt32();
     }
     base.doHandleMessage(msg);
 }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:14,代码来源:AbstractRenderable.cs

示例5: PathFollowPosition3D

        public PathFollowPosition3D(IDataReader state)
            : base(state)
        {
            addInterface(typeof(IPosition3D));

            m_speed = state.ReadSingle();
            int numPoints = state.ReadInt32();
            for (int i = 0; i < numPoints; ++i)
            {
                Vector3 newPoint = new Vector3();
                newPoint.X = state.ReadSingle();
                newPoint.Y = state.ReadSingle();
                newPoint.Z = state.ReadSingle();
                m_path.Add(newPoint);
            }
            m_pos1 =  m_pos2 = 0;
            m_position = m_path[m_pos1];
            if (m_path.Count > 1)
            {
                m_pos2 = 1;
            }
            OnChanged(new Position3DChangedEventArgs(m_position));
        }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:23,代码来源:PathFollowPosition3D.cs

示例6: AutoDestroyLogic

 /// <summary>
 /// 
 /// </summary>
 /// <param name="state"></param>
 public AutoDestroyLogic(IDataReader state)
     : base(state)
 {
     m_timeout = state.ReadInt32();
 }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:9,代码来源:AutoDestroyLogic.cs

示例7: doHandleMessage

 public override void doHandleMessage(IDataReader msg)
 {
     XnaScrapId msgId = new XnaScrapId(msg);
     if (msgId.Equals(ChangePositionMsgId))
     {
         m_position.X = (float)msg.ReadInt32();
         m_position.Y = (float)msg.ReadInt32();
         m_position.Z = (float)msg.ReadInt32();
         OnChanged();
     }
     base.doHandleMessage(msg);
 }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:12,代码来源:TeeterLogic3D.cs

示例8: AbstractRenderable

 public AbstractRenderable(IDataReader state)
     : base(state)
 {
     m_visible = state.ReadBoolean();
     m_layer = state.ReadInt32();
 }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:6,代码来源:AbstractRenderable.cs

示例9: deserialize

 public void deserialize(IDataReader state)
 {
     x = state.ReadInt32();
     y = state.ReadInt32();
     w = state.ReadInt32();
     h = state.ReadInt32();
 }
开发者ID:DelBero,项目名称:XnaScrap,代码行数:7,代码来源:Camera.cs


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