當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。