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


C# GameServerPacket.ReadSByte方法代码示例

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


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

示例1: OnPosChange

		private void OnPosChange(GameServerPacket packet)
		{
			packet.ReadInt32(); // card id
			int pc = GetLocalPlayer(packet.ReadByte());
			int pl = packet.ReadByte();
			int ps = packet.ReadSByte();
			packet.ReadSByte(); // pp
			int cp = packet.ReadSByte();
			ClientCard card = _duel.GetCard(pc, (CardLocation)pl, ps);
			if (card != null)
				card.Position = cp;
		}
开发者ID:247321453,项目名称:YgoServer,代码行数:12,代码来源:GameBehavior.cs

示例2: OnChaining

		private void OnChaining(GameServerPacket packet)
		{
			packet.ReadInt32(); // card id
			int pcc = GetLocalPlayer(packet.ReadByte());
			int pcl = packet.ReadByte();
			int pcs = packet.ReadSByte();
			int subs = packet.ReadSByte();
			ClientCard card = _duel.GetCard(pcc, pcl, pcs, subs);
			int cc = GetLocalPlayer(packet.ReadByte());
			_ai.OnChaining(card, cc);
		}
开发者ID:247321453,项目名称:YgoServer,代码行数:11,代码来源:GameBehavior.cs

示例3: OnMove

		private void OnMove(GameServerPacket packet)
		{
			int cardId = packet.ReadInt32();
			int pc = GetLocalPlayer(packet.ReadByte());
			int pl = packet.ReadByte();
			int ps = packet.ReadSByte();
			packet.ReadSByte(); // pp
			int cc = GetLocalPlayer(packet.ReadByte());
			int cl = packet.ReadByte();
			int cs = packet.ReadSByte();
			int cp = packet.ReadSByte();
			packet.ReadInt32(); // reason

			ClientCard card = _duel.GetCard(pc, (CardLocation)pl, ps);

			if ((pl & (int)CardLocation.Overlay) != 0)
			{
				pl = pl & 0x7f;
				card = _duel.GetCard(pc, (CardLocation)pl, ps);
				if (card != null)
					card.Overlays.Remove(cardId);
			}
			else
				_duel.RemoveCard((CardLocation)pl, card, pc, ps);

			if ((cl & (int)CardLocation.Overlay) != 0)
			{
				cl = cl & 0x7f;
				card = _duel.GetCard(cc, (CardLocation)cl, cs);
				if (card != null)
					card.Overlays.Add(cardId);
			}
			else
			{
				_duel.AddCard((CardLocation)cl, cardId, cc, cs, cp);
				if ((pl & (int)CardLocation.Overlay) == 0 && card != null)
				{
					ClientCard newcard = _duel.GetCard(cc, (CardLocation)cl, cs);
					if (newcard != null)
						newcard.Overlays.AddRange(card.Overlays);
				}
			}
		}
开发者ID:247321453,项目名称:YgoServer,代码行数:43,代码来源:GameBehavior.cs


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