本文整理汇总了C#中Server.Engines.Mahjong.MahjongGame类的典型用法代码示例。如果您正苦于以下问题:C# MahjongGame类的具体用法?C# MahjongGame怎么用?C# MahjongGame使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MahjongGame类属于Server.Engines.Mahjong命名空间,在下文中一共展示了MahjongGame类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BuildWalls
public static void BuildWalls(MahjongGame game, NetState state, PacketReader pvSrc)
{
if (game == null || !game.Players.IsInGameDealer(state.Mobile))
return;
game.ResetWalls(state.Mobile);
}
示例2: MahjongDealerIndicator
public MahjongDealerIndicator( MahjongGame game, Point2D position, MahjongPieceDirection direction, MahjongWind wind )
{
m_Game = game;
m_Position = position;
m_Direction = direction;
m_Wind = wind;
}
示例3: MahjongGeneralInfo
public MahjongGeneralInfo( MahjongGame game )
: base(0xDA)
{
EnsureCapacity( 13 );
m_Stream.Write( (int) game.Serial );
m_Stream.Write( (byte) 0 );
m_Stream.Write( (byte) 0x5 );
m_Stream.Write( (short) 0 );
m_Stream.Write( (byte) 0 );
m_Stream.Write( (byte) ( ( game.ShowScores ? 0x1 : 0x0 ) | ( game.SpectatorVision ? 0x2 : 0x0 ) ) );
m_Stream.Write( (byte) game.Dices.First );
m_Stream.Write( (byte) game.Dices.Second );
m_Stream.Write( (byte) game.DealerIndicator.Wind );
m_Stream.Write( (short) game.DealerIndicator.Position.Y );
m_Stream.Write( (short) game.DealerIndicator.Position.X );
m_Stream.Write( (byte) game.DealerIndicator.Direction );
m_Stream.Write( (short) game.WallBreakIndicator.Position.Y );
m_Stream.Write( (short) game.WallBreakIndicator.Position.X );
}
示例4: MahjongWallBreakIndicator
public MahjongWallBreakIndicator( MahjongGame game, GenericReader reader )
{
m_Game = game;
int version = reader.ReadInt();
m_Position = reader.ReadPoint2D();
}
示例5: MahjongJoinGame
public MahjongJoinGame( MahjongGame game ) : base( 0xDA )
{
EnsureCapacity( 9 );
m_Stream.Write( (int) game.Serial );
m_Stream.Write( (byte) 0 );
m_Stream.Write( (byte) 0x19 );
}
示例6: ExitGame
public static void ExitGame(MahjongGame game, NetState state, PacketReader pvSrc)
{
if (game == null)
return;
Mobile from = state.Mobile;
game.Players.LeaveGame(from);
}
示例7: AssignDealer
public static void AssignDealer(MahjongGame game, NetState state, PacketReader pvSrc)
{
if (game == null || !game.Players.IsInGameDealer(state.Mobile))
return;
int position = pvSrc.ReadByte();
game.Players.AssignDealer(position);
}
示例8: MahjongDices
public MahjongDices( MahjongGame game, GenericReader reader )
{
m_Game = game;
/*int version = */reader.ReadInt();
m_First = reader.ReadInt();
m_Second = reader.ReadInt();
}
示例9: MahjongDices
public MahjongDices(MahjongGame game, GenericReader reader)
{
this.m_Game = game;
int version = reader.ReadInt();
this.m_First = reader.ReadInt();
this.m_Second = reader.ReadInt();
}
示例10: MahjongTile
public MahjongTile(MahjongGame game, int number, MahjongTileType value, Point2D position, int stackLevel, MahjongPieceDirection direction, bool flipped)
{
this.m_Game = game;
this.m_Number = number;
this.m_Value = value;
this.m_Position = position;
this.m_StackLevel = stackLevel;
this.m_Direction = direction;
this.m_Flipped = flipped;
}
示例11: GivePoints
public static void GivePoints(MahjongGame game, NetState state, PacketReader pvSrc)
{
if (game == null || !game.Players.IsInGamePlayer(state.Mobile))
return;
int to = pvSrc.ReadByte();
int amount = pvSrc.ReadInt32();
game.Players.TransferScore(state.Mobile, to, amount);
}
示例12: MahjongPlayers
public MahjongPlayers(MahjongGame game, int maxPlayers, int baseScore)
{
m_Game = game;
m_Spectators = new ArrayList();
m_Players = new Mobile[maxPlayers];
m_InGame = new bool[maxPlayers];
m_PublicHand = new bool[maxPlayers];
m_Scores = new int[maxPlayers];
for (int i = 0; i < m_Scores.Length; i++)
m_Scores[i] = baseScore;
}
示例13: ChangeOption
public static void ChangeOption(MahjongGame game, NetState state, PacketReader pvSrc)
{
if (game == null || !game.Players.IsInGameDealer(state.Mobile))
return;
pvSrc.ReadInt16();
pvSrc.ReadByte();
int options = pvSrc.ReadByte();
game.ShowScores = (options & 0x1) != 0;
game.SpectatorVision = (options & 0x2) != 0;
}
示例14: MahjongPlayers
public MahjongPlayers(MahjongGame game, GenericReader reader)
{
this.m_Game = game;
this.m_Spectators = new ArrayList();
int version = reader.ReadInt();
int seats = reader.ReadInt();
this.m_Players = new Mobile[seats];
this.m_InGame = new bool[seats];
this.m_PublicHand = new bool[seats];
this.m_Scores = new int[seats];
for (int i = 0; i < seats; i++)
{
this.m_Players[i] = reader.ReadMobile();
this.m_PublicHand[i] = reader.ReadBool();
this.m_Scores[i] = reader.ReadInt();
}
this.m_DealerPosition = reader.ReadInt();
}
示例15: MahjongRelieve
public MahjongRelieve(MahjongGame game)
: base(0xDA)
{
this.EnsureCapacity(9);
this.m_Stream.Write((int)game.Serial);
this.m_Stream.Write((byte)0);
this.m_Stream.Write((byte)0x1A);
}