• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# TileFlag类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中TileFlag的典型用法代码示例。如果您正苦于以下问题:C# TileFlag类的具体用法?C# TileFlag怎么用?C# TileFlag使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



TileFlag类属于命名空间,在下文中一共展示了TileFlag类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: SetFlag

		private void SetFlag(TileFlag flag, bool set)
		{
			if (set)
				Flags |= flag;
			else
				Flags &= ~flag;
		}
开发者ID:Ricealso,项目名称:TerrariaAPI-Server,代码行数:7,代码来源:Tile.cs


示例2: return

 public bool this[TileFlag flag]
 {
     get
     {
         return ((this.Value & flag) != 0);
     }
 }
开发者ID:Skinny1001,项目名称:PlayUO,代码行数:7,代码来源:TileFlags.cs


示例3: LandData

		public unsafe LandData(OldLandTileDataMul mulstruct)
		{
			m_TexID = mulstruct.texID;
			m_Flags = (TileFlag)mulstruct.flags;
			m_Unk1 = 0;
			m_Name = TileData.ReadNameString(mulstruct.name);
		}
开发者ID:Crome696,项目名称:ServUO,代码行数:7,代码来源:TileData.cs


示例4: ItemData

		public ItemData( string name, TileFlag flags, int weight, int quality, int quantity, int value, int height )
		{
			m_Name = name;
			m_Flags = flags;
			m_Weight = (byte)weight;
			m_Quality = (byte)quality;
			m_Quantity = (byte)quantity;
			m_Value = (byte)value;
			m_Height = (byte)height;
		}
开发者ID:nydehi,项目名称:runuomondains,代码行数:10,代码来源:TileData.cs


示例5: ItemData

 public ItemData(string name, TileFlag flags, int weight, int quality, int quantity, int value, int height, int anim)
 {
     this.m_Name = name;
     this.m_Flags = flags;
     this.m_Weight = (byte)weight;
     this.m_Quality = (byte)quality;
     this.m_Quantity = (byte)quantity;
     this.m_Value = (byte)value;
     this.m_Height = (byte)height;
     this.m_Animation = (short)anim;
 }
开发者ID:HankTheDrunk,项目名称:ultimaonlinemapcreator,代码行数:11,代码来源:ItemData.cs


示例6: ItemData

 public ItemData(string name, TileFlag flags, int weight, int quality, int quantity, int value, int height, int anim)
 {
     _name = name;
     _flags = flags;
     _weight = (byte)weight;
     _quality = (byte)quality;
     _quantity = (byte)quantity;
     _value = (byte)value;
     _height = (byte)height;
     _animation = (short)anim;
 }
开发者ID:andyhebear,项目名称:HappyQ-WowServer,代码行数:11,代码来源:ItemData.cs


示例7: LandData

		public LandData( string name, TileFlag flags )
		{
			m_Name = name;
			m_Flags = flags;
		}
开发者ID:nydehi,项目名称:runuomondains,代码行数:5,代码来源:TileData.cs


示例8: FindRegionTileLocations

		private void FindRegionTileLocations( ref List<Point3D> locations, Region r, List<int> includetilelist, List<int> excludetilelist, TileFlag tileflag )
		{
			if( r == null || r.Area == null ) return;

			int count = r.Area.Length;

			if( locations == null ) locations = new List<Point3D>();

			// calculate fields of all rectangles (for probability calculating)
			for( int n = 0; n < count; n++ )
			{
				object o = r.Area[n];
				int sx = 0;
				int sy = 0;
				int w = -1;
				int h = -1;
				if( o is Rectangle2D )
				{
					sx = ((Rectangle2D)o).X;
					sy = ((Rectangle2D)o).Y;
					w = ((Rectangle2D)o).X + ((Rectangle2D)o).Width;
					h = ((Rectangle2D)o).Y + ((Rectangle2D)o).Height;
				}
				else
					if( o is Rectangle3D )
					{
						sx = ((Rectangle3D)o).Start.X;
						sy = ((Rectangle3D)o).Start.Y;
						w = ((Rectangle3D)o).Width;
						h = ((Rectangle3D)o).Height;
					}

				// find all of the valid tile locations in the area
				FindTileLocations( ref locations, r.Map, sx, sy, w, h, includetilelist, excludetilelist, tileflag );
			}


		}
开发者ID:greeduomacro,项目名称:hubroot,代码行数:38,代码来源:XmlSpawner2.cs


示例9: LandData

 public LandData(string name, TileFlag flags,int id)
 {
     _name = name;
     _flags = flags;
     _id = id;
 }
开发者ID:greeduomacro,项目名称:UOFiddlerWPF,代码行数:6,代码来源:LandData.cs


示例10: LandData

 public unsafe LandData(LandTileOldDataMul oldmulstruct)
 {
     m_TexID = oldmulstruct.texID;
     m_Flags = (TileFlag)oldmulstruct.flags;
     m_Name = TileData.ReadNameString(oldmulstruct.name);
 }
开发者ID:svn2github,项目名称:fiddler-plus,代码行数:6,代码来源:TileData.cs


示例11: ReadData

        public void ReadData(string[] split)
        {
            m_Name = String.IsNullOrEmpty(split[1]) ? m_Name : split[1];
            m_Weight = System.Convert.ToByte(split[2]);
            m_Quality = System.Convert.ToByte(split[3]);
            m_Animation = (short)TileData.ConvertStringToInt(split[4]);
            m_Height = System.Convert.ToByte(split[5]);
            m_Hue = System.Convert.ToByte(split[6]);
            m_Quantity = System.Convert.ToByte(split[7]);
            m_StackOffset = System.Convert.ToByte(split[8]);
            m_MiscData = System.Convert.ToInt16(split[9]);
            m_Unk2 = System.Convert.ToByte(split[10]);
            m_Unk3 = System.Convert.ToByte(split[11]);

            //m_Flags = 0;
            int temp = System.Convert.ToByte(split[12]);
            if (temp != 0)
                m_Flags |= TileFlag.Background;
            temp = System.Convert.ToByte(split[13]);
            if (temp != 0)
                m_Flags |= TileFlag.Weapon;
            temp = System.Convert.ToByte(split[14]);
            if (temp != 0)
                m_Flags |= TileFlag.Transparent;
            temp = System.Convert.ToByte(split[15]);
            if (temp != 0)
                m_Flags |= TileFlag.Translucent;
            temp = System.Convert.ToByte(split[16]);
            if (temp != 0)
                m_Flags |= TileFlag.Wall;
            temp = System.Convert.ToByte(split[17]);
            if (temp != 0)
                m_Flags |= TileFlag.Damaging;
            temp = System.Convert.ToByte(split[18]);
            if (temp != 0)
                m_Flags |= TileFlag.Impassable;
            temp = System.Convert.ToByte(split[19]);
            if (temp != 0)
                m_Flags |= TileFlag.Wet;
            temp = System.Convert.ToByte(split[20]);
            if (temp != 0)
                m_Flags |= TileFlag.Unknown1;
            temp = System.Convert.ToByte(split[21]);
            if (temp != 0)
                m_Flags |= TileFlag.Surface;
            temp = System.Convert.ToByte(split[22]);
            if (temp != 0)
                m_Flags |= TileFlag.Bridge;
            temp = System.Convert.ToByte(split[23]);
            if (temp != 0)
                m_Flags |= TileFlag.Generic;
            temp = System.Convert.ToByte(split[24]);
            if (temp != 0)
                m_Flags |= TileFlag.Window;
            temp = System.Convert.ToByte(split[25]);
            if (temp != 0)
                m_Flags |= TileFlag.NoShoot;
            temp = System.Convert.ToByte(split[26]);
            if (temp != 0)
                m_Flags |= TileFlag.ArticleA;
            temp = System.Convert.ToByte(split[27]);
            if (temp != 0)
                m_Flags |= TileFlag.ArticleAn;
            temp = System.Convert.ToByte(split[28]);
            if (temp != 0)
                m_Flags |= TileFlag.Internal;
            temp = System.Convert.ToByte(split[29]);
            if (temp != 0)
                m_Flags |= TileFlag.Foliage;
            temp = System.Convert.ToByte(split[30]);
            if (temp != 0)
                m_Flags |= TileFlag.PartialHue;
            temp = System.Convert.ToByte(split[31]);
            if (temp != 0)
                m_Flags |= TileFlag.Unknown2;
            temp = System.Convert.ToByte(split[32]);
            if (temp != 0)
                m_Flags |= TileFlag.Map;
            temp = System.Convert.ToByte(split[33]);
            if (temp != 0)
                m_Flags |= TileFlag.Container;
            temp = System.Convert.ToByte(split[34]);
            if (temp != 0)
                m_Flags |= TileFlag.Wearable;
            temp = System.Convert.ToByte(split[35]);
            if (temp != 0)
                m_Flags |= TileFlag.LightSource;
            temp = System.Convert.ToByte(split[36]);
            if (temp != 0)
                m_Flags |= TileFlag.Animation;
            temp = System.Convert.ToByte(split[37]);
            if (temp != 0)
                m_Flags |= TileFlag.HoverOver;
            temp = System.Convert.ToByte(split[38]);
            if (temp != 0)
                m_Flags |= TileFlag.Unknown3;
            temp = System.Convert.ToByte(split[39]);
            if (temp != 0)
                m_Flags |= TileFlag.Armor;
            temp = System.Convert.ToByte(split[40]);
//.........这里部分代码省略.........
开发者ID:svn2github,项目名称:fiddler-plus,代码行数:101,代码来源:TileData.cs


示例12: ItemData

 public ItemData(string name, TileFlag flags, int weight, int quality, int quantity, int value, int height, int anim, int hue, int stackingoffset, int MiscData, int unk2, int unk3)
 {
     m_Name = name;
     m_Flags = flags;
     m_Weight = (byte)weight;
     m_Quality = (byte)quality;
     m_Quantity = (byte)quantity;
     m_Value = (byte)value;
     m_Height = (byte)height;
     m_Animation = (short)anim;
     m_Hue = (byte)hue;
     m_StackOffset = (byte)stackingoffset;
     m_MiscData = (short)MiscData;
     m_Unk2 = (byte)unk2;
     m_Unk3 = (byte)unk3;
 }
开发者ID:svn2github,项目名称:fiddler-plus,代码行数:16,代码来源:TileData.cs


示例13: Verify

		private static bool Verify(Item item, TileFlag reqFlags, bool ignoreMovableImpassables, int x, int y)
		{
			return Verify(item, reqFlags, ignoreMovableImpassables) && Verify(item, x, y);
		}
开发者ID:greeduomacro,项目名称:last-wish,代码行数:4,代码来源:FastMovement.cs


示例14: LandData

 public LandData(string name, TileFlag flags)
 {
     _name = name;
     _flags = flags;
 }
开发者ID:AugmentedInsanity,项目名称:OpenUO,代码行数:5,代码来源:LandData.cs


示例15: SetFlag

 private void SetFlag(TileFlag flag, bool set)
 {
     if (set)
     {
         this.Flags |= flag;
         return;
     }
     this.Flags &= ~flag;
 }
开发者ID:DaGamesta,项目名称:TerrariaAPI-Server,代码行数:9,代码来源:Tile.cs


示例16: ReadData

 public void ReadData(string[] split)
 {
     int i = 1;
     m_Name = split[i++];
     m_TexID = (short)TileData.ConvertStringToInt(split[i++]);
     m_Unk1 = TileData.ConvertStringToInt(split[i++]);
     m_Flags = 0;
     int temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Background;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Weapon;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Transparent;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Translucent;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Wall;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Damaging;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Impassable;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Wet;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Unknown1;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Surface;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Bridge;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Generic;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Window;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.NoShoot;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.ArticleA;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.ArticleAn;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Internal;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Foliage;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.PartialHue;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Unknown2;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Map;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Container;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Wearable;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.LightSource;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Animation;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.HoverOver;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Unknown3;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Armor;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Roof;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.Door;
     temp = System.Convert.ToByte(split[i++]);
     if (temp != 0)
         m_Flags |= TileFlag.StairBack;
//.........这里部分代码省略.........
开发者ID:slayde1970,项目名称:ultimasdk,代码行数:101,代码来源:TileData.cs


示例17: GetLandTile

 public IEnumerable<ModelLandData> GetLandTile(TileFlag flags = TileFlag.None, bool valid = true)
 {
     return new ObservableCollection<ModelLandData>(StorageLand.Where(t => t.IsValid == valid && t.Flags.HasFlag(flags)).Select(t => new ModelLandData(t)));
 }
开发者ID:svn2github,项目名称:essence-udk,代码行数:4,代码来源:UODataManager.cs


示例18: FindTileLocations

		private void FindTileLocations( ref List<Point3D> locations, Map map, int startx, int starty, int width, int height, List<int> includetilelist, List<int> excludetilelist, TileFlag tileflag )
		{
			if( width < 0 || height < 0 || map == null ) return;

			if( locations == null ) locations = new List<Point3D>();

			bool includetile;
			bool excludetile;
			for( int x = startx; x <= startx + width; x++ )
			{
				for( int y = starty; y <= starty + height; y++ )
				{
					// go through all of the tiles at the location and find those that are in the allowed tiles list
					LandTile ltile = map.Tiles.GetLandTile( x, y );
					TileFlag lflags = TileData.LandTable[ltile.ID].Flags;

					// check the land tile
					if( includetilelist != null && includetilelist.Count > 0 )
					{
						includetile = includetilelist.Contains( ltile.ID );
					}
					else
					{
						includetile = true;
					}

					// non-excluded tiles must also be passable
					if( excludetilelist != null && excludetilelist.Count > 0 )
					{
						// also require the tile to be passable
						excludetile = ((lflags & TileFlag.Impassable) != 0) || excludetilelist.Contains( ltile.ID );
					}
					else
					{
						excludetile = false;
					}

					if( includetile && !excludetile && ((lflags & tileflag) == tileflag) )
					{
						//Console.WriteLine("found landtile {0}/{1} at {2},{3},{4}", ltile.ID, ltile.ID, x, y, ltile.Z + ltile.Height);
						locations.Add( new Point3D( x, y, ltile.Z + ltile.Height ) );
						continue;
					}

					StaticTile[] statictiles = map.Tiles.GetStaticTiles( x, y, true );

					// check the static tiles
					for( int i = 0; i < statictiles.Length; ++i )
					{
						StaticTile stile = statictiles[i];
						TileFlag sflags = TileData.ItemTable[stile.ID].Flags;

						if( includetilelist != null && includetilelist.Count > 0 )
						{
							includetile = includetilelist.Contains( stile.ID );
						}
						else
						{
							includetile = true;
						}

						// non-excluded tiles must also be passable
						if( excludetilelist != null && excludetilelist.Count > 0 )
						{
							excludetile = ((sflags & TileFlag.Impassable) != 0) || excludetilelist.Contains( stile.ID );
						}
						else
						{
							excludetile = false;
						}

						if( includetile && !excludetile && ((sflags & tileflag) == tileflag) )
						{
							//Console.WriteLine("found statictile {0}/{1} at {2},{3},{4}", stile.ID, stile.ID, x, y, stile.Z + stile.Height);
							locations.Add( new Point3D( x, y, stile.Z + stile.Height ) );
							break;
						}
					}
				}
			}
		}
开发者ID:greeduomacro,项目名称:hubroot,代码行数:81,代码来源:XmlSpawner2.cs


示例19: SetFlag

 private void SetFlag(TileFlag flag, bool value)
 {
     if (ArtTiles == null) return;
     for (int i = 0; i < ArtTiles.Length; ++i) {
         if (value)
             Ultima.TileData.ItemTable[ArtTiles[i]].Flags |= flag;
         else
             Ultima.TileData.ItemTable[ArtTiles[i]].Flags &= ~flag;
     }
     ReadTileData();
 }
开发者ID:svn2github,项目名称:fiddler-plus,代码行数:11,代码来源:EquipmentEdit.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# TileIndex类代码示例发布时间:2022-05-24
下一篇:
C# TileData类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap