本文整理汇总了C#中WCell.Constants.Updates.UpdateFieldId类的典型用法代码示例。如果您正苦于以下问题:C# UpdateFieldId类的具体用法?C# UpdateFieldId怎么用?C# UpdateFieldId使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
UpdateFieldId类属于WCell.Constants.Updates命名空间,在下文中一共展示了UpdateFieldId类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetByteArray
public byte[] GetByteArray(UpdateFieldId field)
{
return m_updateValues[field.RawId].ByteArray;
}
开发者ID:pallmall,项目名称:WCell,代码行数:4,代码来源:ObjectBase.Core.cs
示例2: GetInt
public int GetInt(UpdateFieldId id)
{
return Values.GetInt32((uint)id.RawId);
}
开发者ID:ebakkedahl,项目名称:WCell,代码行数:4,代码来源:UpdateBlock.cs
示例3: GetByte
public byte GetByte(UpdateFieldId id)
{
var i = (uint)id.RawId * 4;
if (Values.Length < i + 1)
{
return 0;
}
return Values[i];
}
开发者ID:ebakkedahl,项目名称:WCell,代码行数:9,代码来源:UpdateBlock.cs
示例4: PushFieldUpdateToPlayer
public void PushFieldUpdateToPlayer(Character character, UpdateFieldId field, byte[] value)
{
using (var packet = GetFieldUpdatePacket(field, value))
{
SendUpdatePacket(character, packet);
}
}
开发者ID:KroneckerX,项目名称:WCell,代码行数:7,代码来源:ObjectBase.Update.cs
示例5: GetULong
public ulong GetULong(UpdateFieldId id)
{
return Values.GetUInt64((uint)id.RawId);
}
开发者ID:ebakkedahl,项目名称:WCell,代码行数:4,代码来源:UpdateBlock.cs
示例6: PushFieldUpdate
public void PushFieldUpdate(UpdateFieldId field, EntityId value)
{
if (!IsInWorld)
{
// set the value and don't push, we aren't in game so we'll get it on the next self full update
SetEntityId(field, value);
return;
}
using (var packet = GetFieldUpdatePacket(field, value))
{
SendUpdatePacket(this, packet);
}
}
开发者ID:WCellFR,项目名称:WCellFR,代码行数:15,代码来源:Character.Update.cs
示例7: GetFieldUpdatePacket
protected UpdatePacket GetFieldUpdatePacket(UpdateFieldId field, byte[] value)
{
var blocks = (field.RawId >> 5) + 1;
var emptyBlockSize = (blocks - 1) * 4;
//UpdatePacket packet = new UpdatePacket(BufferManager.Small.CheckOut());
var packet = new UpdatePacket { Position = 4 };
packet.Write(1); // Update Count
packet.Write((byte)UpdateType.Values);
EntityId.WritePacked(packet);
packet.Write((byte)blocks);
//packet.TotalLength += emptyBlockSize;
packet.Zero(emptyBlockSize);
packet.Write(1 << (field.RawId & 31));
packet.Write(value);
return packet;
}
开发者ID:KroneckerX,项目名称:WCell,代码行数:23,代码来源:ObjectBase.Update.cs
示例8: SetUInt32
public void SetUInt32(UpdateFieldId field, uint value)
{
SetUInt32(field.RawId, value);
}
开发者ID:pallmall,项目名称:WCell,代码行数:4,代码来源:ObjectBase.Core.cs
示例9: SetUInt64
public void SetUInt64(UpdateFieldId field, ulong value)
{
SetUInt64(field.RawId, value);
}
开发者ID:pallmall,项目名称:WCell,代码行数:4,代码来源:ObjectBase.Core.cs
示例10: SetUInt16High
public void SetUInt16High(UpdateFieldId field, ushort value)
{
SetUInt16High(field.RawId, value);
}
开发者ID:pallmall,项目名称:WCell,代码行数:4,代码来源:ObjectBase.Core.cs
示例11: GetFloat
public float GetFloat(UpdateFieldId field)
{
return m_updateValues[field.RawId].Float;
}
开发者ID:pallmall,项目名称:WCell,代码行数:4,代码来源:ObjectBase.Core.cs
示例12: SetInt16Low
public void SetInt16Low(UpdateFieldId field, short value)
{
SetInt16Low(field.RawId, value);
}
开发者ID:pallmall,项目名称:WCell,代码行数:4,代码来源:ObjectBase.Core.cs
示例13: SetFloat
public void SetFloat(UpdateFieldId field, float value)
{
SetFloat(field.RawId, value);
}
开发者ID:pallmall,项目名称:WCell,代码行数:4,代码来源:ObjectBase.Core.cs
示例14: GetByte
public byte GetByte(UpdateFieldId field, int index)
{
return m_updateValues[field.RawId].GetByte(index);
}
开发者ID:pallmall,项目名称:WCell,代码行数:4,代码来源:ObjectBase.Core.cs
示例15: SendFieldUpdateToArea
/// <summary>
/// Sends a manual update field refresh to all nearby characters.
/// </summary>
/// <param name="field">the field to refresh</param>
public void SendFieldUpdateToArea(UpdateFieldId field)
{
if (IsAreaActive)
{
var value = GetUInt32(field.RawId);
using (var packet = GetFieldUpdatePacket(field, value))
{
SendPacketToArea(packet);
}
}
}
开发者ID:KroneckerX,项目名称:WCell,代码行数:15,代码来源:WorldObject.cs
示例16: SetEntityId
public void SetEntityId(UpdateFieldId field, EntityId id)
{
SetEntityId(field.RawId, id);
}
开发者ID:pallmall,项目名称:WCell,代码行数:4,代码来源:ObjectBase.Core.cs
示例17: SendFieldUpdateTo
/// <summary>
/// Sends a manual update field refresh to all nearby characters.
/// </summary>
/// <param name="field">the field to refresh</param>
public void SendFieldUpdateTo(IPacketReceiver rcv, UpdateFieldId field)
{
if (IsAreaActive)
{
var value = GetUInt32(field.RawId);
using (var packet = GetFieldUpdatePacket(field, value))
{
rcv.Send(packet);
}
}
}
开发者ID:KroneckerX,项目名称:WCell,代码行数:15,代码来源:WorldObject.cs
示例18: GetInt16Low
public short GetInt16Low(UpdateFieldId field)
{
return m_updateValues[field.RawId].Int16Low;
}
开发者ID:pallmall,项目名称:WCell,代码行数:4,代码来源:ObjectBase.Core.cs
示例19: WriteSpontaneousUpdate
protected void WriteSpontaneousUpdate(UpdateMask mask, UpdatePacket packet, Character receiver, UpdateFieldId[] indices, bool visible)
{
// create mask
for (var i = 0; i < indices.Length; i++)
{
var index = indices[i].RawId;
var field = UpdateFieldMgr.Get(ObjectTypeId).Fields[index];
for (var j = 0; j < field.Size; j++)
{
mask.SetBit(index + j);
}
}
// write mask
mask.WriteTo(packet);
// write values
for (var i = mask.m_lowestIndex; i <= mask.m_highestIndex; i++)
{
if (mask.GetBit(i))
{
if (visible)
{
WriteUpdateValue(packet, receiver, i);
}
else
{
packet.Write(0);
}
}
}
}
开发者ID:KroneckerX,项目名称:WCell,代码行数:32,代码来源:ObjectBase.Update.cs
示例20: SetByteArray
public void SetByteArray(UpdateFieldId field, byte[] value)
{
SetByteArray(field.RawId, value);
}
开发者ID:pallmall,项目名称:WCell,代码行数:4,代码来源:ObjectBase.Core.cs
注:本文中的WCell.Constants.Updates.UpdateFieldId类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论