本文整理汇总了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);
}
示例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;
}
示例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();
}
示例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);
}
示例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));
}
示例6: AutoDestroyLogic
/// <summary>
///
/// </summary>
/// <param name="state"></param>
public AutoDestroyLogic(IDataReader state)
: base(state)
{
m_timeout = state.ReadInt32();
}
示例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);
}
示例8: AbstractRenderable
public AbstractRenderable(IDataReader state)
: base(state)
{
m_visible = state.ReadBoolean();
m_layer = state.ReadInt32();
}
示例9: deserialize
public void deserialize(IDataReader state)
{
x = state.ReadInt32();
y = state.ReadInt32();
w = state.ReadInt32();
h = state.ReadInt32();
}