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


C# GenericReader.ReadPoint2D方法代码示例

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


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

示例1: MahjongWallBreakIndicator

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

			int version = reader.ReadInt();

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

示例2: MahjongDealerIndicator

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

			int version = reader.ReadInt();

			m_Position = reader.ReadPoint2D();
			m_Direction = (MahjongPieceDirection) reader.ReadInt();
			m_Wind = (MahjongWind) reader.ReadInt();
		}
开发者ID:Godkong,项目名称:RunUO,代码行数:10,代码来源:MahjongDealerIndicator.cs

示例3: MahjongTile

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

            int version = reader.ReadInt();

            m_Number = reader.ReadInt();
            m_Value = (MahjongTileType) reader.ReadInt();
            m_Position = reader.ReadPoint2D();
            m_StackLevel = reader.ReadInt();
            m_Direction = (MahjongPieceDirection) reader.ReadInt();
            m_Flipped = reader.ReadBool();
        }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:13,代码来源:MahjongTile.cs

示例4: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadEncodedInt();
			Point = reader.ReadPoint2D();
			Range = reader.ReadInt();
			Map = reader.ReadMap();

			int count = reader.ReadInt();
			Messages = new string[ count ];

			for ( int i = 0; i < count; i++ )
				Messages[i] = reader.ReadString();

			OnMessage = reader.ReadInt();
		}	
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:16,代码来源:StudyObjective.cs

示例5: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
                case 1:
                    {
                        m_Facet = reader.ReadMap();
                        goto case 0;
                    }
				case 0:
				{
					m_Bounds = reader.ReadRect2D();

					m_Width = reader.ReadInt();
					m_Height = reader.ReadInt();

					m_Protected = reader.ReadBool();

					int count = reader.ReadInt();
					for ( int i = 0; i < count; i++ )
						m_Pins.Add( reader.ReadPoint2D() );

					break;
				}
			}
		}
开发者ID:Crome696,项目名称:ServUO,代码行数:30,代码来源:MapItem.cs

示例6: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();
			m_Level = (int)reader.ReadInt();
			m_Map = reader.ReadMap();
			m_Location = reader.ReadPoint2D();
		}
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:8,代码来源:TreasureMessage.cs

示例7: BoatCourse

        public BoatCourse(GenericReader reader)
        {
            int version = reader.ReadInt();

            m_GivenMap = reader.ReadBool();

            int c = reader.ReadInt();
            for (int i = 0; i < c; i++)
                m_Waypoints.Add(reader.ReadPoint2D());
        }
开发者ID:Crome696,项目名称:ServUO,代码行数:10,代码来源:BaseBoat.cs

示例8: Deserialize

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );

            int version = reader.ReadInt();

            switch ( version )
            {
                case 3:
                case 2:
                case 1:
                    {
                        m_CompletedBy = reader.ReadMobile();

                        goto case 0;
                    }
                case 0:
                    {
                        m_Level = (int) reader.ReadInt();
                        m_Completed = reader.ReadBool();
                        m_Decoder = reader.ReadMobile();
                        m_Map = reader.ReadMap();
                        m_Location = reader.ReadPoint2D();

                        if ( version == 0 && m_Completed )
                            m_CompletedBy = m_Decoder;

                        break;
                    }
            }

            if ( version < 2 )
            {
                if ( m_Level < 1 )
                    m_Level = 1;

                m_Map = GetRandomMap();
                m_Location = GetRandomLocation( m_Map );
            }

            if ( version < 3 )
            {
                ClearPins();
                RecalculateDisplayMap();
            }
        }
开发者ID:Ravenwolfe,项目名称:xrunuo,代码行数:46,代码来源:TreasureMap.cs

示例9: Deserialize

		private void Deserialize(GenericReader reader)
		{
			int version = reader.ReadInt();

			_Dimensions = new Point2D();
			_Entries = new List<string>();
			_Points = new List<Point3D>();

			switch (version)
			{
				case 0:
					{
						_Font = reader.ReadInt();
						_Phantom = reader.ReadBool();
						_Stealth = reader.ReadBool();
						_Reverse = reader.ReadBool();
						_Lock = reader.ReadBool();

						_Dimensions = reader.ReadPoint2D();

						int count = reader.ReadInt();

						for (int i = 0; i < count; i++)
						{
							_Entries.Add(reader.ReadString());
						}

						_Skin = reader.ReadInt();

						count = reader.ReadInt();

						for (int i = 0; i < count; i++)
						{
							_Points.Add(reader.ReadPoint3D());
						}

						break;
					}
			}
		}
开发者ID:jasegiffin,项目名称:JustUO,代码行数:40,代码来源:ToolbarInfo.cs

示例10: Deserialize

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
                case 1:
                    {
                        goto case 0;
                    }
                case 0:
                    {
                        m_Level = (int)reader.ReadInt();
                        m_Map = reader.ReadMap();
                        m_Location = reader.ReadPoint2D();

                        //					if ( version == 0 && m_Completed )
                        //						m_CompletedBy = m_Decoder;

                        break;
                    }
            }
        }
开发者ID:greeduomacro,项目名称:annox,代码行数:25,代码来源:TreasureMessage.cs

示例11: MultiComponentList

        public MultiComponentList( GenericReader reader )
        {
            int version = reader.ReadInt();

            m_Min = reader.ReadPoint2D();
            m_Max = reader.ReadPoint2D();
            m_Center = reader.ReadPoint2D();
            m_Width = reader.ReadInt();
            m_Height = reader.ReadInt();

            int length = reader.ReadInt();

            MultiTileEntry[] allTiles = m_List = new MultiTileEntry[length];

            if ( version == 0 ) {
                for ( int i = 0; i < length; ++i )
                {
                    int id = reader.ReadShort();
                    if ( id >= 0x4000 )
                        id -= 0x4000;

                    allTiles[i].m_ItemID = (ushort)id;
                    allTiles[i].m_OffsetX = reader.ReadShort();
                    allTiles[i].m_OffsetY = reader.ReadShort();
                    allTiles[i].m_OffsetZ = reader.ReadShort();
                    allTiles[i].m_Flags = reader.ReadInt();
                }
            } else {
                for ( int i = 0; i < length; ++i )
                {
                    allTiles[i].m_ItemID = reader.ReadUShort();
                    allTiles[i].m_OffsetX = reader.ReadShort();
                    allTiles[i].m_OffsetY = reader.ReadShort();
                    allTiles[i].m_OffsetZ = reader.ReadShort();
                    allTiles[i].m_Flags = reader.ReadInt();
                }
            }

            TileList[][] tiles = new TileList[m_Width][];
            m_Tiles = new StaticTile[m_Width][][];

            for ( int x = 0; x < m_Width; ++x )
            {
                tiles[x] = new TileList[m_Height];
                m_Tiles[x] = new StaticTile[m_Height][];

                for ( int y = 0; y < m_Height; ++y )
                    tiles[x][y] = new TileList();
            }

            for ( int i = 0; i < allTiles.Length; ++i )
            {
                if ( i == 0 || allTiles[i].m_Flags != 0 )
                {
                    int xOffset = allTiles[i].m_OffsetX + m_Center.m_X;
                    int yOffset = allTiles[i].m_OffsetY + m_Center.m_Y;

                    tiles[xOffset][yOffset].Add( (ushort)allTiles[i].m_ItemID, (sbyte)allTiles[i].m_OffsetZ );
                }
            }

            for ( int x = 0; x < m_Width; ++x )
                for ( int y = 0; y < m_Height; ++y )
                    m_Tiles[x][y] = tiles[x][y].ToArray();
        }
开发者ID:Godkong,项目名称:Origins,代码行数:65,代码来源:MultiData.cs

示例12: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );

			int version = reader.ReadInt();

			switch ( version )
			{
				case 7:
				{
					m_AccessLevel = (AccessLevel)reader.ReadInt();
					goto case 6;
				}
				case 6:
				{
					m_TransportPets = reader.ReadBool();
					m_PetMessage = reader.ReadString();
					goto case 5;
				}
	
				case 5:
				{
					m_PointDest2 = reader.ReadPoint3D();
					m_PointDest3 = reader.ReadPoint3D();
					m_PointDest4 = reader.ReadPoint3D();
					m_PointDest5 = reader.ReadPoint3D();
					m_RectStart = reader.ReadPoint2D();
					m_RectEnd = reader.ReadPoint2D();

					goto case 4;
				}

				case 4:
				{
					m_Criminal = reader.ReadBool();

					goto case 3;
				}

				case 3:
				{
					m_DelayMessage = reader.ReadString();
					m_SparkleEffect = reader.ReadBool();

					goto case 2;
				}

				case 2:
				{
					m_SourceEffect = reader.ReadBool();
					m_DestEffect = reader.ReadBool();
					m_Delay = reader.ReadTimeSpan();
					m_SoundID = reader.ReadEncodedInt();

					goto case 1;
				}
				case 1:
				{
					m_Creatures = reader.ReadBool();

					goto case 0;
				}
				case 0:
				{
					m_Active = reader.ReadBool();
					m_PointDest = reader.ReadPoint3D();
					m_MapDest = reader.ReadMap();

					break;
				}
			}
			
			if (version < 7)
			{
				m_AccessLevel = AccessLevel.Player;
			}

			if ( version < 6)
			{
				m_TransportPets = true;
				m_PetMessage = null;
						
			}
			
		}
开发者ID:zerodowned,项目名称:angelisland,代码行数:85,代码来源:Teleporter.cs

示例13: MultiComponentList

		public MultiComponentList( GenericReader reader )
		{
			int version = reader.ReadInt();

			switch ( version )
			{
				case 0:
				{
					m_Min = reader.ReadPoint2D();
					m_Max = reader.ReadPoint2D();
					m_Center = reader.ReadPoint2D();
					m_Width = reader.ReadInt();
					m_Height = reader.ReadInt();

					int length = reader.ReadInt();

					MultiTileEntry[] allTiles = m_List = new MultiTileEntry[length];

					for ( int i = 0; i < length; ++i )
					{
						allTiles[i].m_ItemID = reader.ReadShort();
						allTiles[i].m_OffsetX = reader.ReadShort();
						allTiles[i].m_OffsetY = reader.ReadShort();
						allTiles[i].m_OffsetZ = reader.ReadShort();
						allTiles[i].m_Flags = reader.ReadInt();
					}

					TileList[][] tiles = new TileList[m_Width][];
					m_Tiles = new Tile[m_Width][][];

					for ( int x = 0; x < m_Width; ++x )
					{
						tiles[x] = new TileList[m_Height];
						m_Tiles[x] = new Tile[m_Height][];

						for ( int y = 0; y < m_Height; ++y )
							tiles[x][y] = new TileList();
					}

					for ( int i = 0; i < allTiles.Length; ++i )
					{
						if ( i == 0 || allTiles[i].m_Flags != 0 )
						{
							int xOffset = allTiles[i].m_OffsetX + m_Center.m_X;
							int yOffset = allTiles[i].m_OffsetY + m_Center.m_Y;

							#region SA
							// Note #1 | 0x8000 produces problems, namely the server doesn't increase your Z when climbing stairs thus the itemid isn't reconized properly.
							tiles[xOffset][yOffset].Add( (short)((allTiles[i].m_ItemID & 0x7FFF) | 0x4000), (sbyte)allTiles[i].m_OffsetZ );
							#endregion
						}
					}

					for ( int x = 0; x < m_Width; ++x )
						for ( int y = 0; y < m_Height; ++y )
							m_Tiles[x][y] = tiles[x][y].ToArray();

					break;
				}
			}
		}
开发者ID:PepeBiondi,项目名称:runsa,代码行数:61,代码来源:MultiData.cs

示例14: DaviesDeedEntry

			public DaviesDeedEntry( GenericReader reader )
			{
				int version = reader.ReadByte();
				m_type = reader.ReadInt(); 
				m_Level = reader.ReadInt();
				m_Decoder = reader.ReadMobile();
				m_Map = reader.ReadMap();
				m_Location2d = reader.ReadPoint2D();
				m_Location3d = reader.ReadPoint3D();
				m_Bounds = reader.ReadRect2D();
				m_Mapnumber = reader.ReadString(); 
			}
开发者ID:Tukaramdas,项目名称:ServUO-EC-Test-Fork,代码行数:12,代码来源:DaviesLockerDeed.cs

示例15: Deserialize

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();

            switch (version)
            {
                case 0:
                    m_Running = reader.ReadBool();
                    m_X1Y1 = reader.ReadPoint2D();
                    m_X2Y2 = reader.ReadPoint2D();
                    m_StartPointPlayer = reader.ReadPoint3D();
                    m_StartPointOpponent = reader.ReadPoint3D();
                    m_ExpelPoint = reader.ReadPoint3D();
                    m_ScoreTable = new Hashtable();
                    int len = reader.ReadInt();
                    for (int i = 0; i < len; i++)
                        m_ScoreTable.Add(reader.ReadMobile(), reader.ReadInt());
                    m_UsersInLine = new List<Mobile>();
                    m_ManageTimer = new ManageTimer(this);
                    break;
            }

            if (m_UsersInLine == null)
                m_UsersInLine = new List<Mobile>();
        }
开发者ID:greeduomacro,项目名称:cov-shard-svn-1,代码行数:27,代码来源:Arena.cs


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