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


C# Mahjong.MahjongGame类代码示例

本文整理汇总了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);
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:7,代码来源:MahjongPacketHandlers.cs

示例2: MahjongDealerIndicator

		public MahjongDealerIndicator( MahjongGame game, Point2D position, MahjongPieceDirection direction, MahjongWind wind )
		{
			m_Game = game;
			m_Position = position;
			m_Direction = direction;
			m_Wind = wind;
		}
开发者ID:Godkong,项目名称:RunUO,代码行数:7,代码来源:MahjongDealerIndicator.cs

示例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 );
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:25,代码来源:Packets.cs

示例4: MahjongWallBreakIndicator

		public MahjongWallBreakIndicator( MahjongGame game, GenericReader reader )
		{
			m_Game = game;

			int version = reader.ReadInt();

			m_Position = reader.ReadPoint2D();
		}
开发者ID:Godkong,项目名称:Origins,代码行数:8,代码来源:MahjongWallBreakIndicator.cs

示例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 );
		}
开发者ID:Godkong,项目名称:RunUO,代码行数:8,代码来源:Packets.cs

示例6: ExitGame

        public static void ExitGame(MahjongGame game, NetState state, PacketReader pvSrc)
        {
            if (game == null)
                return;

            Mobile from = state.Mobile;

            game.Players.LeaveGame(from);
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:9,代码来源:MahjongPacketHandlers.cs

示例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);
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:9,代码来源:MahjongPacketHandlers.cs

示例8: MahjongDices

        public MahjongDices( MahjongGame game, GenericReader reader )
        {
            m_Game = game;

            /*int version = */reader.ReadInt();

            m_First = reader.ReadInt();
            m_Second = reader.ReadInt();
        }
开发者ID:BackupTheBerlios,项目名称:sunuo-svn,代码行数:9,代码来源:MahjongDices.cs

示例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();
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:9,代码来源:MahjongDices.cs

示例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;
 }
开发者ID:FreeReign,项目名称:forkuo,代码行数:10,代码来源:MahjongTile.cs

示例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);
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:10,代码来源:MahjongPacketHandlers.cs

示例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;
        }
开发者ID:FreeReign,项目名称:imaginenation,代码行数:13,代码来源:MahjongPlayers.cs

示例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;
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:13,代码来源:MahjongPacketHandlers.cs

示例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();
        }
开发者ID:FreeReign,项目名称:forkuo,代码行数:22,代码来源:MahjongPlayers.cs

示例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);
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:9,代码来源:Packets.cs


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