本文整理汇总了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;
}
示例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);
}
示例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);
}
}
}