當前位置: 首頁>>代碼示例>>C#>>正文


C# Items.BaseAddon類代碼示例

本文整理匯總了C#中Server.Items.BaseAddon的典型用法代碼示例。如果您正苦於以下問題:C# BaseAddon類的具體用法?C# BaseAddon怎麽用?C# BaseAddon使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


BaseAddon類屬於Server.Items命名空間,在下文中一共展示了BaseAddon類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Deserialize

        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );
            int version = reader.ReadInt();

            SelectedAddon = ( BaseAddon )reader.ReadItem();
        }
開發者ID:zerodowned,項目名稱:My-Stuff,代碼行數:7,代碼來源:AddOnEditor_Att.cs

示例2: AddComplexComponent

 private static void AddComplexComponent(BaseAddon addon, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource, string name)
 {
     AddonComponent ac;
     ac = new AddonComponent(item);
     if (name != null)
         ac.Name = name;
     if (hue != 0)
         ac.Hue = hue;
     if (lightsource != -1)
         ac.Light = (LightType) lightsource;
     addon.AddComponent(ac, xoffset, yoffset, zoffset);
 }
開發者ID:greeduomacro,項目名稱:unknown-shard-1,代碼行數:12,代碼來源:BigScreenTVEastAddon.cs

示例3: ConfirmAddonPlacementGump

		public ConfirmAddonPlacementGump( Mobile from, BaseAddon addon ) : base( 50, 50 )
		{
			from.CloseGump( typeof(ConfirmAddonPlacementGump) );
			
			m_Addon = addon;

			AddPage( 0 );

			AddBackground( 10, 10, 190, 140, 0x242C );

			AddHtml( 30, 30, 150, 75, String.Format( "<div align=CENTER>{0}</div>", "Are you sure you want to place this addon here?" ), false, false );

			AddButton( 40, 105, 0x81A, 0x81B, 0x1, GumpButtonType.Reply, 0 ); // Okay
			AddButton( 110, 105, 0x819, 0x818, 0x2, GumpButtonType.Reply, 0 ); // Cancel
		}
開發者ID:zerodowned,項目名稱:angelisland,代碼行數:15,代碼來源:ConfirmAddonPlacementGump.cs

示例4: AddComplexComponent

 private static void AddComplexComponent(BaseAddon addon, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource, string name, int amount)
 {
     AddonComponent ac;
     ac = new AddonComponent(item);
     if (name != null && name.Length > 0)
         ac.Name = name;
     if (hue != 0)
         ac.Hue = hue;
     if (amount > 1)
     {
         ac.Stackable = true;
         ac.Amount = amount;
     }
     if (lightsource != -1)
         ac.Light = (LightType) lightsource;
     addon.AddComponent(ac, xoffset, yoffset, zoffset);
 }
開發者ID:greeduomacro,項目名稱:UO-Forever,代碼行數:17,代碼來源:FirepitsmallAddon.cs

示例5: Convert2Static

 public void Convert2Static(BaseAddon design)
 {
     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();
 }
開發者ID:greeduomacro,項目名稱:RuneUO,代碼行數:15,代碼來源:Addon2Static.cs

示例6: Deserialize

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

            int version = reader.ReadInt();

            switch ( version )
            {
                case 1:
                case 0:
                {
                    m_Addon = reader.ReadItem() as BaseAddon;
                    m_Offset = reader.ReadPoint3D();

                    if ( m_Addon != null )
                        m_Addon.OnComponentLoaded( this );

                    ApplyLightTo( this );

                    break;
                }
            }

            if ( version < 1 && Weight == 0 )
                Weight = -1;
        }
開發者ID:justdanofficial,項目名稱:khaeros,代碼行數:26,代碼來源:AddonComponent.cs

示例7: Deserialize

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

			int version = reader.ReadInt();

			switch (version)
			{
				case 0:
				{
					m_Addon = reader.ReadItem() as BaseAddon;
					break;
				}
			}
		}
開發者ID:zerodowned,項目名稱:angelisland,代碼行數:15,代碼來源:Doors.cs

示例8: Deserialize

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

             	int version = reader.ReadInt();

             	m_Elevator = (BaseAddon)reader.ReadItem();
             	m_InUse = reader.ReadBool();
             	m_Height = reader.ReadInt();
             	m_Ticks = reader.ReadInt();
             	m_Peaked = reader.ReadBool();
             	m_OutOfUseID = reader.ReadInt();
             	m_InUseID = reader.ReadInt();
             	m_NorthWestEdge = reader.ReadPoint3D();
             	m_SizeNorthSouth = reader.ReadInt();
             	m_SizeEastWest = reader.ReadInt();

            if( reader.ReadBool() )
                BeginMove( reader.ReadDeltaTime() - DateTime.Now );
        }
開發者ID:justdanofficial,項目名稱:khaeros,代碼行數:20,代碼來源:ElevatorSwitch.cs

示例9: AddSpinningWheelS

 public void AddSpinningWheelS(int xoff, int yoff, int zoff)
 {
     m_SpinningWheel2 = new SpinningwheelSouthAddon();
     m_SpinningWheel2.MoveToWorld(new Point3D(xoff + this.X, yoff + this.Y, zoff + this.Z), this.Map);
 }
開發者ID:Godkong,項目名稱:RunUO,代碼行數:5,代碼來源:BaseHouse.cs

示例10: AddTrainingE

 public void AddTrainingE(int xoff, int yoff, int zoff)
 {
     m_Training1 = new TrainingDummyEastAddon();
     m_Training1.MoveToWorld(new Point3D(xoff + this.X, yoff + this.Y, zoff + this.Z), this.Map);
 }
開發者ID:Godkong,項目名稱:RunUO,代碼行數:5,代碼來源:BaseHouse.cs

示例11: AddSmallForge

 public void AddSmallForge(int xoff, int yoff, int zoff)
 {
     m_SmallForge = new SmallForgeAddon();
     m_SmallForge.MoveToWorld(new Point3D(xoff + this.X, yoff + this.Y, zoff + this.Z), this.Map);
 }
開發者ID:Godkong,項目名稱:RunUO,代碼行數:5,代碼來源:BaseHouse.cs

示例12: AddSpinningWheelE

 public void AddSpinningWheelE(int xoff, int yoff, int zoff)
 {
     m_SpinningWheel1 = new SpinningwheelEastAddon();
     m_SpinningWheel1.MoveToWorld(new Point3D(xoff + this.X, yoff + this.Y, zoff + this.Z), this.Map);
 }
開發者ID:Godkong,項目名稱:RunUO,代碼行數:5,代碼來源:BaseHouse.cs

示例13: AddMill

 public void AddMill(int xoff, int yoff, int zoff)
 {
     m_Mill = new FlourMillSouthAddon();
     m_Mill.MoveToWorld(new Point3D(xoff + this.X, yoff + this.Y, zoff + this.Z), this.Map);
 }
開發者ID:Godkong,項目名稱:RunUO,代碼行數:5,代碼來源:BaseHouse.cs

示例14: AddAnvil

 public void AddAnvil(int xoff, int yoff, int zoff)
 {
     m_Anvil = new AnvilEastAddon();
     m_Anvil.MoveToWorld(new Point3D(xoff + this.X, yoff + this.Y, zoff + this.Z), this.Map);
 }
開發者ID:Godkong,項目名稱:RunUO,代碼行數:5,代碼來源:BaseHouse.cs

示例15: AddLargeForge

 public void AddLargeForge(int xoff, int yoff, int zoff)
 {
     m_LargeForge = new LargeForgeSouthHouseAddon();
     m_LargeForge.MoveToWorld(new Point3D(xoff + this.X, yoff + this.Y, zoff + this.Z), this.Map);
 }
開發者ID:Godkong,項目名稱:RunUO,代碼行數:5,代碼來源:BaseHouse.cs


注:本文中的Server.Items.BaseAddon類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。