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

C# Static类代码示例

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

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



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

示例1: PreviewHouse

		public PreviewHouse( int multiID ) : base( multiID | 0x8000 )
		{
			m_Components = new List<Item>();

			MultiComponentList mcl = this.Components;

			for ( int i = 1; i < mcl.List.Length; ++i )
			{
				MultiTileEntry entry = mcl.List[i];

				if ( entry.m_Flags == 0 )
				{
					#region SA
					Item item = new Static( entry.m_ItemID & 0x7FFF );
					#endregion

					item.MoveToWorld( new Point3D( X + entry.m_OffsetX, Y + entry.m_OffsetY, Z + entry.m_OffsetZ ), Map );

					m_Components.Add( item );
				}
			}

			m_Timer = new DecayTimer( this );
			m_Timer.Start();
		}
开发者ID:PepeBiondi,项目名称:runsa,代码行数:25,代码来源:PreviewHouse.cs


示例2: OphidianArchmage

		public OphidianArchmage() : base( AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
		{
			LastTimeSpoken = DateTime.Now;
			Name = m_Names[Utility.Random( m_Names.Length )];
			Body = 85;
			SpeechHue = 2129;
			BaseSoundID = 639;

			SetStr( 281, 305 );
			SetDex( 191, 215 );
			SetInt( 226, 250 );

			SetHits( 169, 183 );
			SetStam( 36, 45 );

			SetDamage( 5, 10 );

			SetSkill( SkillName.EvalInt, 95.1, 120.0 );
			SetSkill( SkillName.Magery, 95.1, 100.0 );
			SetSkill( SkillName.MagicResist, 75.0, 97.5 );
			SetSkill( SkillName.Tactics, 65.0, 87.5 );
			SetSkill( SkillName.Wrestling, 20.2, 60.0 );

			Fame = 11500;
			Karma = -11500;

			VirtualArmor = 44;

			Item item = null;
			switch( Utility.Random(1000) )
		{
			case 0: PackItem( item = new Static(0x1E92) ); break;
			case 1: PackItem( item = new Static(0x1E93) ); break;
		}
			if (item != null)
			item.Movable = true;

			PackGold( 450, 500 );
			PackScroll( 0, 8 );
			PackScroll( 0, 8 );
			PackScroll( 0, 8 );

					switch ( Utility.Random( 2 ) )
			{
				case 0: PackWeapon( 0, 5 ); break;
				case 1: PackArmor( 0, 5 ); break;
			}

			switch ( Utility.Random( 5 ) )
			{
				case 0: PackWeapon( 1, 5 ); break;
				case 1: PackArmor( 1, 5 ); break;
			}

				if ( 0.10 > Utility.RandomDouble() )
					PackItem( new Arrow( Utility.RandomMinMax( 150, 250 ) ) );

				if ( 0.01 > Utility.RandomDouble() )
					PackItem( new InvisCloak() );
		}
开发者ID:kamronbatman,项目名称:DefianceUO-Pre1.10,代码行数:60,代码来源:OphidianArchmage.cs


示例3: Start

    private Static save; //日数、起動回数、HP、MP、名声、ボーナスポイント

    #endregion Fields

    #region Methods

    // Use this for initialization
    void Start()
    {
        save = GetComponent<Static>();
        Canvas = GameObject.Find ("Canvas");
        //if (save.GetDay () == 1) {

            Canvas.GetComponent<uGUI_Msg>().dispMessage(EventText[0]);

        //}
    }
开发者ID:hutu-nohito,项目名称:Lilith2,代码行数:17,代码来源:UI.cs


示例4: Start

    // Use this for initialization
    void Start()
    {
        _static = GameObject.FindGameObjectWithTag("Manager").GetComponent<Static>();
        pcZ = GameObject.FindGameObjectWithTag("Player").GetComponent<Player_ControllerZ>();

        for(int i = 0; i < 3; i++)
        {
            istyuto[i] = false;
        }
    }
开发者ID:hutu-nohito,项目名称:Lilith2,代码行数:11,代码来源:Tyutorial.cs


示例5: AddTrunk

		public virtual void AddTrunk()
		{
			if( m_Trunk != null )
				m_Trunk.Delete();

			if( TrunkID > 0 )
			{
				m_TrunkID = TrunkID;
				m_Trunk = new Static( TrunkID );
				m_Trunk.Name = "a tree trunk";
				m_Trunk.MoveToWorld( this.Location, this.Map );
			}
		}
开发者ID:greeduomacro,项目名称:hubroot,代码行数:13,代码来源:HarvestableTree.cs


示例6: Execute

		public override void Execute( CommandEventArgs args, object o )
		{
			if( o is AddonComponent )
			{
				BaseAddon addon = ((AddonComponent)o).Addon;

				if( addon.Components.Count > 0 )
				{
					for( int i = 0; i < addon.Components.Count; i++ )
					{
						AddonComponent component = addon.Components[i];
						Static newStatic = new Static( component.ItemID );

						newStatic.Hue = component.Hue;
						newStatic.Name = component.Name;
						newStatic.MoveToWorld( new Point3D( component.Location ), component.Map );
					}
				}

				addon.Delete();

				AddResponse( "The add-on has been converted to static objects." );
			}
			else if( o is Item && !(o is Static) )
			{
				Item i = (Item)o;
				Static newItem = new Static( i.ItemID );

				newItem.Hue = i.Hue;
				newItem.Layer = i.Layer;
				newItem.Light = i.Light;
				newItem.Name = i.Name;
				newItem.MoveToWorld( new Point3D( i.Location ), i.Map );

				if( i.Parent == args.Mobile )
					newItem.Bounce( args.Mobile );

				if( i is Container )
					((Container)i).Destroy();
				else
					i.Delete();

				AddResponse( "The item has been converted to a static." );
			}
			else
			{
				LogFailure( "This command only works with non-static items or add-ons." );
			}
		}
开发者ID:greeduomacro,项目名称:hubroot,代码行数:49,代码来源:ToStatic.cs


示例7: Build

		/// <summary>
		/// Builds a structure received from PB
		/// </summary>
		/// <param name="account">The account name for the user requesting the builder</param>
		/// <param name="items">An ArrayList of BuiltItem objects</param>
		/// <param name="map">The map on which the generation occurs</param>
		public static void Build( string account, ArrayList items, Map map )
		{
			ArrayList worldItems = new ArrayList();

			m_UserData[ account ] = worldItems;

			foreach( BuildItem bItem in items )
			{
				Static item = new Static( bItem.ID );
				item.Hue = bItem.Hue;

				item.MoveToWorld( new Point3D( bItem.X, bItem.Y, bItem.Z ), map );

				worldItems.Add( item );
			}
		}
开发者ID:greeduomacro,项目名称:annox,代码行数:22,代码来源:BuilderCore.cs


示例8: Start

    void Start()
    {
        playerController = GetComponent<CharacterController>();//rigidbodyを使う場合は外す
        animator = GetComponentInChildren<Animator>();//アニメータを使うとき
        save = GameObject.FindGameObjectWithTag("Manager").GetComponent<Static>();

        //HPとMPの引継ぎ
        H_point = save.H_Point;
        M_point = save.M_Point;

        //初期パラメタを保存
        max_HP = H_point;
        max_MP = M_point;
        base_Pow = power;
        base_Def = def;
        base_Sp = speed;
        base_Ju = jump;
    }
开发者ID:hutu-nohito,项目名称:Lilith2,代码行数:18,代码来源:Debug_pcZ.cs


示例9: Start

    // Use this for initialization
    void Start()
    {
        guiText = this.GetComponent<Text>();

        switch(type){
            case Text_Type.Day:
                _static = GameObject.FindGameObjectWithTag("Manager").GetComponent<Static>();

                if (_static.day - (int)_static.day == 0.5f) {
                    guiText.text = (int)_static.day + "日目 夜";
                }
                else
                {
                    guiText.text = (int)_static.day + "日目 昼";
                }
                break;
            case Text_Type.LP:
                _static = GameObject.FindGameObjectWithTag("Manager").GetComponent<Static>();
                guiText.text = "名声 " + _static.lank_P;
                break;
            case Text_Type.BP:
                _static = GameObject.FindGameObjectWithTag("Manager").GetComponent<Static>();
                guiText.text = "BP " + _static.bonus_P;
                break;
            case Text_Type.HP:

                pcZ = GameObject.FindGameObjectWithTag ("Player").GetComponent<Player_ControllerZ>();
                break;
            case Text_Type.MP:

                pcZ = GameObject.FindGameObjectWithTag ("Player").GetComponent<Player_ControllerZ>();
                break;
            case Text_Type.Magic:

                mc = GameObject.FindGameObjectWithTag("Player").GetComponent<Magic_Controller>();
                break;
            case Text_Type.Enemy:

                ecZ = GameObject.Find("Boss_DarkLilith").GetComponent<Enemy_ControllerZ>();
                break;
            default:
                break;
        }
    }
开发者ID:hutu-nohito,项目名称:Lilith2,代码行数:45,代码来源:TextImput.cs


示例10: OnTarget

 protected override void OnTarget( Mobile from, object targeted )
 {
     if ( targeted is AddonComponent )
     {
         BaseAddon design = ((AddonComponent)targeted).Addon;
         if ( design.Components.Count > 0 )
         {
             for ( int i = 0; i < design.Components.Count; ++i )
             {
                 AddonComponent component = (AddonComponent)((design.Components)[i]);
                 Static equivalent = new Static( component.HuedItemID  );  //( component.ItemID );
                 equivalent.Location = component.Location;  //component.Location;
                 equivalent.Map = component.Map; //component.Map;
                 equivalent.Hue = component.Hue; //component.Map;
             }
         }
         design.Delete();
         from.SendMessage("Addon structure statified. You can now freeze it.");
     }
 }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:20,代码来源:Addon2Static.cs


示例11: OnTarget

			protected override void OnTarget(Mobile from, object targeted)
			{
				IPoint3D p = targeted as IPoint3D;

				if ( p != null )
				{
					foreach( BuildItem bItem in m_Items )
					{
						Static item = new Static( bItem.ID );
						item.Hue = bItem.Hue;
						
						int x = p.X + bItem.X;
						int y = p.Y + bItem.Y;
						
						Map map = from.Map;
						int z = map.Tiles.GetLandTile( x, y ).Z;
						
						item.MoveToWorld( new Point3D( x, y, z ), map );
					}

					from.SendMessage( BoxConfig.MessageHue, "{0} items created.", m_Items.Count );
				}
			}
开发者ID:greeduomacro,项目名称:annox,代码行数:23,代码来源:RandomBrushMessage.cs


示例12: SetClienttype

 public Builder SetClienttype(Static.ClientType value)
 {
     PrepareBuilder();
     result.hasClienttype = true;
     result.clienttype_ = value;
     return this;
 }
开发者ID:scriptord3,项目名称:Mjolnir,代码行数:7,代码来源:Login.cs


示例13: PropertyHelper_DoesNotFindStaticProperties

        public void PropertyHelper_DoesNotFindStaticProperties()
        {
            // Arrange
            var anonymous = new Static();

            // Act + Assert
            var helper = Assert.Single(PropertyHelper.GetProperties(anonymous));
            Assert.Equal("Prop5", helper.Name);
        }
开发者ID:sparraguerra,项目名称:Common,代码行数:9,代码来源:PropertyHelperTest.cs


示例14: IncreaseTier

		public override void IncreaseTier()
		{			
			base.IncreaseTier();
			
			List<object> list = new List<object>();
			Item c;			
			
			switch ( Tier )
			{				
				case 1:					
					// easel with canvas
					c = new Static( 0xF66 );
					c.MoveToWorld( new Point3D( 1417, 1602, 30 ), Map );
					list.Add( c );
					
					// table
					c = new Static( 0xB6B );
					c.MoveToWorld( new Point3D( 1417, 1606, 30 ), Map );
					list.Add( c );
					
					c = new Static( 0xB6D );
					c.MoveToWorld( new Point3D( 1417, 1605, 30 ), Map );
					list.Add( c );
					
					c = new Static( 0xB6C );
					c.MoveToWorld( new Point3D( 1417, 1604, 30 ), Map );
					list.Add( c );
					
					// bonsai tree					
					c = new Static( 0x28DC );
					c.MoveToWorld( new Point3D( 1417, 1604, 36 ), Map );
					list.Add( c );
					
					// bottles		
					c = new Static( 0xE29 );
					c.MoveToWorld( new Point3D( 1417, 1605, 37 ), Map );
					list.Add( c );		
					
					c = new Static( 0xE28 );
					c.MoveToWorld( new Point3D( 1417, 1605, 36 ), Map );
					list.Add( c );		
					
					c = new Static( 0xE2C );
					c.MoveToWorld( new Point3D( 1417, 1606, 37 ), Map );
					list.Add( c );
					
					// pen and ink					
					c = new Static( 0xFBF );
					c.MoveToWorld( new Point3D( 1417, 1606, 36 ), Map );
					list.Add( c );
					
					// cooking book			
					c = new Static( 0xFBE );
					c.MoveToWorld( new Point3D( 1418, 1606, 42 ), Map );
					c.Name = "A Cookbook";
					list.Add( c );
					break;				
			}			
			
			if ( list.Count > 0 )
				Tiers.Add( list );
		}
开发者ID:brodock,项目名称:genova-project,代码行数:62,代码来源:ArtsSection.cs


示例15: GenGauntlet_OnCommand

		public static void GenGauntlet_OnCommand( CommandEventArgs e )
		{
			/* Begin healer room */
			CreatePricedHealer( 5000, 387, 400 );
			CreateTeleporter( 390, 407, 394, 405 );

			BaseDoor healerDoor = CreateDoorSet( 393, 404, true, 0x44E );

			healerDoor.Locked = true;
			healerDoor.KeyValue = Key.RandomValue();

			if ( healerDoor.Link != null )
			{
				healerDoor.Link.Locked = true;
				healerDoor.Link.KeyValue = Key.RandomValue();
			}
			/* End healer room */

			/* Begin supply room */
			CreateMorphItem( 433, 371, 0x29F, 0x116, 3, 0x44E );
			CreateMorphItem( 433, 372, 0x29F, 0x115, 3, 0x44E );

			CreateVarietyDealer( 492, 369 );

			for ( int x = 434; x <= 478; ++x )
			{
				for ( int y = 371; y <= 372; ++y )
				{
					Static item = new Static( 0x524 );

					item.Hue = 1;
					item.MoveToWorld( new Point3D( x, y, -1 ), Map.Malas );
				}
			}
			/* End supply room */

			/* Begin gauntlet cycle */
			CreateTeleporter( 471, 428, 474, 428 );
			CreateTeleporter( 462, 494, 462, 498 );
			CreateTeleporter( 403, 502, 399, 506 );
			CreateTeleporter( 357, 476, 356, 480 );
			CreateTeleporter( 361, 433, 357, 434 );

			GauntletSpawner sp1 = CreateSpawner( "DarknightCreeper",		491, 456,	473, 432,	417, 426,	true,	473, 412, 39, 60 );
			GauntletSpawner sp2 = CreateSpawner( "FleshRenderer",			482, 520,	468, 496,	426, 422,	false,	448, 496, 56, 48 );
			GauntletSpawner sp3 = CreateSpawner( "Impaler",					406, 538,	408, 504,	432, 430,	false,	376, 504, 64, 48 );
			GauntletSpawner sp4 = CreateSpawner( "ShadowKnight",			335, 512,	360, 478,	424, 439,	false,	300, 478, 72, 64 );
			GauntletSpawner sp5 = CreateSpawner( "AbysmalHorror",			326, 433,	360, 429,	416, 435,	true,	300, 408, 60, 56 );
			GauntletSpawner sp6 = CreateSpawner( "DemonKnight",				423, 430,	0,   0,		423, 430,	true,	392, 392, 72, 96 );

			sp1.Sequence = sp2;
			sp2.Sequence = sp3;
			sp3.Sequence = sp4;
			sp4.Sequence = sp5;
			sp5.Sequence = sp6;
			sp6.Sequence = sp1;

			sp1.State = GauntletSpawnerState.InProgress;
			/* End gauntlet cycle */

			/* Begin exit gate */
			ConfirmationMoongate gate = new ConfirmationMoongate();

			gate.Dispellable = false;

			gate.Target = new Point3D( 2350, 1270, -85 );
			gate.TargetMap = Map.Malas;

			gate.GumpWidth = 420;
			gate.GumpHeight = 280;

			gate.MessageColor = 0x7F00;
			gate.MessageNumber = 1062109; // You are about to exit Dungeon Doom.  Do you wish to continue?

			gate.TitleColor = 0x7800;
			gate.TitleNumber = 1062108; // Please verify...

			gate.Hue = 0x44E;

			gate.MoveToWorld( new Point3D( 433, 326, 4 ), Map.Malas );
			/* End exit gate */
		}
开发者ID:Godkong,项目名称:Origins,代码行数:82,代码来源:GauntletSpawner.cs


示例16: ShowSpawnPoints_OnCommand

		public static void ShowSpawnPoints_OnCommand( CommandEventArgs e )
		{
			ArrayList ToShow = new ArrayList();
			foreach( Item item in World.Items.Values )
			{
				if( item is XmlSpawner )
				{
					//turned off visibility. Admins will still see masts but players will not.
					item.Visible = false;    // set the spawn item visibility
					item.Movable = false;    // Make the spawn item movable
					item.Hue = 88;          // Bright blue colour so its easy to spot
					item.ItemID = ShowItemId;   // Ship Mast (Very tall, easy to see if beneath other objects)

					// find container-held spawners to be marked with an external static
					if( (item.Parent != null) && (item.RootParent is Container) )
					{
						ToShow.Add( item );
					}
				}
			}

			// place the statics
			foreach( Item i in ToShow )
			{

				XmlSpawner xml_item = (XmlSpawner)i;
				// does the spawner already have a static attached to it? could happen if two showall commands are issued in a row.
				// if so then dont add another
				if( (xml_item.m_ShowContainerStatic == null || xml_item.m_ShowContainerStatic.Deleted) && xml_item.RootParent is Container )
				{
					Container root_item = xml_item.RootParent as Container;
					// calculate a world location for the static.  Position it just above the container
					int x = root_item.Location.X;
					int y = root_item.Location.Y;
					int z = root_item.Location.Z + 10;

					Static s = new Static( ShowItemId );
					s.Visible = false;
					s.MoveToWorld( new Point3D( x, y, z ), root_item.Map );

					xml_item.m_ShowContainerStatic = s;
				}

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


示例17: Construct

		public Item Construct()
		{
			Item item;

			try
			{
				if ( m_Type == typeofStatic )
				{
					item = new Static( m_ItemID );
				}
				else if ( m_Type == typeofLocalizedStatic )
				{
					int labelNumber = 0;

					for ( int i = 0; i < m_Params.Length; ++i )
					{
						if ( m_Params[i].StartsWith( "LabelNumber" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
							{
								labelNumber = Utility.ToInt32( m_Params[i].Substring( ++indexOf ) );
								break;
							}
						}
					}

					item = new LocalizedStatic( m_ItemID, labelNumber );
				}
				else if ( m_Type == typeofLocalizedSign )
				{
					int labelNumber = 0;

					for ( int i = 0; i < m_Params.Length; ++i )
					{
						if ( m_Params[i].StartsWith( "LabelNumber" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
							{
								labelNumber = Utility.ToInt32( m_Params[i].Substring( ++indexOf ) );
								break;
							}
						}
					}

					item = new LocalizedSign( m_ItemID, labelNumber );
				}
				else if ( m_Type == typeofAnkhWest || m_Type == typeofAnkhEast )
				{
					bool bloodied = false;

					for ( int i = 0; !bloodied && i < m_Params.Length; ++i )
						bloodied = ( m_Params[i] == "Bloodied" );

					if ( m_Type == typeofAnkhWest )
						item = new AnkhWest( bloodied );
					else
						item = new AnkhEast( bloodied );
				}
				else if ( m_Type == typeofMarkContainer )
				{
					bool bone = false;
					bool locked = false;
					Map map = Map.Malas;

					for ( int i = 0; i < m_Params.Length; ++i )
					{
						if ( m_Params[i] == "Bone" )
						{
							bone = true;
						}
						else if ( m_Params[i] == "Locked" )
						{
							locked = true;
						}
						else if ( m_Params[i].StartsWith( "TargetMap" ) )
						{
							int indexOf = m_Params[i].IndexOf( '=' );

							if ( indexOf >= 0 )
								map = Map.Parse( m_Params[i].Substring( ++indexOf ) );
						}
					}

					MarkContainer mc = new MarkContainer( bone, locked );

					mc.TargetMap = map;
					mc.Description = "strange location";

					item = mc;
				}
				else if ( m_Type == typeofHintItem )
				{
					int range = 0;
					int messageNumber = 0;
					string messageString = null;
					int hintNumber = 0;
//.........这里部分代码省略.........
开发者ID:greeduomacro,项目名称:unknown-shard-1,代码行数:101,代码来源:Decorate.cs


示例18: OnTarget

            protected override void OnTarget(Mobile from, object targeted)
            {
                IPoint3D target = targeted as IPoint3D;
                if (target == null)
                    return;

                Map map = from.Map;
                if (map == null)
                    return;

                Point3D location = new Point3D(target);
                if (target is StaticTarget)
                    location.Z -= TileData.ItemTable[((StaticTarget)target).ItemID & 0x3FFF].CalcHeight;

                Item newItem = new Static(m_ItemID);
                newItem.MoveToWorld(location, from.Map);
                from.Target = new CreateItemTarget(m_ItemID, m_Search);
            }
开发者ID:justdanofficial,项目名称:khaeros,代码行数:18,代码来源:SearchImage.cs


示例19: RecreateItems

        private void RecreateItems()
        {
            foreach (DecoreItemInfo info in c_DecoreItemInfos)
            {
                Item item = null;

                if (info.TypeString.ToLower().IndexOf("static", StringComparison.Ordinal) != -1)
                {
                    item = new Static(info.ItemID);
                }
                else
                {
                    try
                    {
                        item = Activator.CreateInstance(ScriptCompiler.FindTypeByFullName(info.TypeString)) as Item;
                    }
                    catch
                    {
                        continue;
                    }
                }

                if (item == null)
                {
                    continue;
                }

                item.ItemID = info.ItemID;
                item.Name = info.Name;
                item.Hue = info.Hue;
                item.Location = info.Location;
                item.Map = info.Map;
                item.Movable = false;
            }
        }
开发者ID:greeduomacro,项目名称:UO-Forever,代码行数:35,代码来源:TownHouseSign.cs


示例20: Write1

        public void Write1(Block[] block)
        {
            if(!m_OceanWrited)
            {
                StaMulW.BaseStream.Position = 0;
                m_OceanOffset = (uint)StaMulW.BaseStream.Position;
                m_OceanLength = (uint)(7 * 64);
                Static[] ocean = new Static[64];
                for (int k = 0; k < 64; ++k)
                {
                    ocean[k].m_ID = (ushort)rand.Next(0x1797, 0x179D);
                    ocean[k].m_Hue = 0;
                    ocean[k].m_X = (byte)(k % 8);
                    ocean[k].m_Y = (byte)(k / 8);
                    ocean[k].m_Z = -45;

                    StaMulW.Write(ocean[k].m_ID);
                    StaMulW.Write(ocean[k].m_X);
                    StaMulW.Write(ocean[k].m_Y);
                    StaMulW.Write(ocean[k].m_Z);
                    StaMulW.Write(ocean[k].m_Hue);
                }
                m_OceanWrited = true;
            }

            for (int i = 0; i < block.Length; ++i)
            {
                MapMulW.Write(block[i].m_Header);
                for (int k = 0; k < 64; ++k)
                {
                    MapMulW.Write(block[i].m_Tiles[k].m_ID);
                    MapMulW.Write(block[i].m_Tiles[k].m_Z);
                }

                if (block[i].m_Statics == null || block[i].m_Statics.Length == 0)
                {
                    block[i].m_Offset = 0xFFFFFFFF;
                    block[i].m_Length = 0;
                }
                else if (block[i].m_Ocean)
                {
                    block[i].m_Offset = ((m_OceanOffset != 0xFFFFFFFF) ? m_OceanOffset : (m_OceanOffset = (uint)StaMulW.BaseStream.Position));
                    block[i].m_Length = ((m_OceanLength != 0) ? m_OceanLength : (m_OceanLength = (uint)(7 * 64)));
                }
                else
                {
                    block[i].m_Offset = (uint)StaMulW.BaseStream.Position;
                    block[i].m_Length = (uint)(7 * block[i].m_Statics.Length);
                }
                StaIdxW.Write(block[i].m_Offset);
                StaIdxW.Write(block[i].m_Length);
                StaIdxW.Write(block[i].m_Unknown);

                if (block[i].m_Offset == 0xFFFFFFFF || block[i].m_Length == 0)
                    continue;

                if (block[i].m_Ocean && m_OceanWrited)
                    continue;

                for (int k = 0; k < block[i].m_Statics.Length; ++k)
                {
                    StaMulW.Write(block[i].m_Statics[k].m_ID);
                    StaMulW.Write(block[i].m_Statics[k].m_X);
                    StaMulW.Write(block[i].m_Statics[k].m_Y);
                    StaMulW.Write(block[i].m_Statics[k].m_Z);
                    StaMulW.Write(block[i].m_Statics[k].m_Hue);
                }

                if (block[i].m_Ocean && !m_OceanWrited)
                    m_OceanWrited = true;
            }

            //m_OceanWrited = false;
        }
开发者ID:svn2github,项目名称:fiddler-plus,代码行数:74,代码来源:MapWorker.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# StaticPagedList类代码示例发布时间:2022-05-24
下一篇:
C# States类代码示例发布时间: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