當前位置: 首頁>>代碼示例>>C#>>正文


C# Updates.UpdateFieldId類代碼示例

本文整理匯總了C#中WCell.Constants.Updates.UpdateFieldId的典型用法代碼示例。如果您正苦於以下問題:C# UpdateFieldId類的具體用法?C# UpdateFieldId怎麽用?C# UpdateFieldId使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


UpdateFieldId類屬於WCell.Constants.Updates命名空間,在下文中一共展示了UpdateFieldId類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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


注:本文中的WCell.Constants.Updates.UpdateFieldId類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。