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


C# Timer.Start方法代碼示例

本文整理匯總了C#中Server.Timer.Start方法的典型用法代碼示例。如果您正苦於以下問題:C# Timer.Start方法的具體用法?C# Timer.Start怎麽用?C# Timer.Start使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Server.Timer的用法示例。


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

示例1: VendorInventory

        public VendorInventory( BaseHouse house, GenericReader reader )
        {
            m_House = house;

            int version = reader.ReadEncodedInt();

            m_Owner = reader.ReadMobile();
            m_VendorName = reader.ReadString();
            m_ShopName = reader.ReadString();

            m_Items = reader.ReadStrongItemList();
            m_Gold = reader.ReadInt();

            m_ExpireTime = reader.ReadDeltaTime();

            if ( m_Items.Count == 0 && m_Gold == 0 )
            {
                Timer.DelayCall( TimeSpan.Zero, new TimerCallback( Delete ) );
            }
            else
            {
                TimeSpan delay = m_ExpireTime - DateTime.UtcNow;
                m_ExpireTimer = new ExpireTimer( this, delay > TimeSpan.Zero ? delay : TimeSpan.Zero );
                m_ExpireTimer.Start();
            }
        }
開發者ID:nathanvy,項目名稱:runuo,代碼行數:26,代碼來源:VendorInventory.cs

示例2: Deserialize

		public override void Deserialize( GenericReader reader )
		{
			base.Deserialize( reader );
			int version = reader.ReadInt();
			i_Timer=new DBSTimer(this);
			i_Timer.Start();
		}
開發者ID:greeduomacro,項目名稱:annox,代碼行數:7,代碼來源:DrunkenBarstool.cs

示例3: Deserialize

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

			int version = reader.ReadInt();

			switch ( version )
			{
				case 0:
				{
					m_Boat = reader.ReadItem() as BaseBoat;
					m_Side = (PlankSide) reader.ReadInt();
					m_Locked = reader.ReadBool();
					m_KeyValue = reader.ReadUInt();

					if ( m_Boat == null )
						Delete();

					break;
				}
			}

			if ( IsOpen )
			{
				m_CloseTimer = new CloseTimer( this );
				m_CloseTimer.Start();
			}
		}
開發者ID:jsrn,項目名稱:MidnightWatchServer,代碼行數:28,代碼來源:Plank.cs

示例4: ChiefParoxysmus

        public ChiefParoxysmus()
            : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
        {
            Name = "Chief Paroxysmus";
            Body = 0x100;

            SetStr( 1200, 1400 );
            SetDex( 75, 85 );
            SetInt( 75, 85 );

            SetHits( 50000 );

            SetDamage( 28, 36 );

            SetDamageType( ResistanceType.Physical, 80 );
            SetDamageType( ResistanceType.Poison, 20 );

            SetResistance( ResistanceType.Physical, 75, 85 );
            SetResistance( ResistanceType.Fire, 40, 50 );
            SetResistance( ResistanceType.Cold, 50, 60 );
            SetResistance( ResistanceType.Poison, 55, 65 );
            SetResistance( ResistanceType.Energy, 50, 60 );

            SetSkill( SkillName.MagicResist, 120.0 );
            SetSkill( SkillName.Tactics, 120.0 );
            SetSkill( SkillName.Wrestling, 120.0 );
            SetSkill( SkillName.Anatomy, 120.0 );
            SetSkill( SkillName.Poisoning, 120.0 );

            Fame = 32000;
            Karma = -32000;

            m_Timer = new TeleportTimer( this );
            m_Timer.Start();
        }
開發者ID:Ravenwolfe,項目名稱:xrunuo,代碼行數:35,代碼來源:ChiefParoxysmus.cs

示例5: CorpseSkull

 public CorpseSkull()
     : base(0x1AE1)
 {
     Movable = false;
     m_Timer = new DecayTimer(this);
     m_Timer.Start();
 }
開發者ID:greeduomacro,項目名稱:annox,代碼行數:7,代碼來源:CorpseSkull.cs

示例6: DuelWall

        public DuelWall( bool northsouth, Mobile from, Mobile to )
            : base(0x80)
        {
            m_From = from;
            m_To = to;
            Movable = false;

            if( northsouth )
            {
                m_Item1 = new InternalItem( this, 1, 0 );
                m_Item2 = new InternalItem( this, -1, 0 );
                m_XOffset1 = 1;
                m_XOffset2 = -1;
                m_YOffset1 = 0;
                m_YOffset2 = 0;
            }
            else
            {
                m_Item1 = new InternalItem( this, 0, 1 );
                m_Item2 = new InternalItem( this, 0, -1 );
                m_XOffset1 = 0;
                m_XOffset2 = 0;
                m_YOffset1 = 1;
                m_YOffset2 = -1;
            }

            m_Timer = new InternalTimer( this, TimeSpan.FromSeconds( 10.0 ), m_From, m_To );
            m_Timer.Start();

            m_End = DateTime.Now + TimeSpan.FromSeconds( 3.0 );

            Effects.PlaySound( new Point3D( X, Y, Z ), Map, 0x1F6 );
        }
開發者ID:cynricthehun,項目名稱:UOLegends,代碼行數:33,代碼來源:DuelWall.cs

示例7: TrackArrow

 public TrackArrow( Mobile from, Mobile target, int range )
     : base(from, target)
 {
     m_From = from;
     m_Timer = new TrackTimer( from, target, range, this );
     m_Timer.Start();
 }
開發者ID:Ravenwolfe,項目名稱:xrunuo,代碼行數:7,代碼來源:Tracking.cs

示例8: Penthesilea

        public Penthesilea(bool decays) : base()
        {
			Name = "Penthesilea";
		    Body = 401;
            VirtualArmor = 50;
			CantWalk = true;
			Female = true;

            HairItemID= 0x203C;
			HairHue = 1153;
			
            AddItem( new Server.Items.FancyDress( 0x481) );
			AddItem( new Server.Items.Sandals( 0x481) );;
			
			Blessed = true;

            if (decays)
            {
                m_Decays = true;
                m_DecayTime = DateTime.Now + TimeSpan.FromSeconds(30);

                m_Timer = new InternalTimer(this, m_DecayTime);
                m_Timer.Start();
            }
        }
開發者ID:greeduomacro,項目名稱:cov-shard-svn-1,代碼行數:25,代碼來源:penthesilea.cs

示例9: 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

示例10: TreasureMapChest

		public TreasureMapChest( Mobile owner, int level, bool temporary ) : base( 0xE40 )
		{
			Name = "a treasure chest";
			m_Owner = owner;
			m_Level = level;
			m_DeleteTime = DateTime.Now + TimeSpan.FromHours( 3.0 );

			m_Temporary = temporary;
			m_Guardians = new List<Mobile>();

			m_Timer = new DeleteTimer( this, m_DeleteTime );
			m_Timer.Start();

			Fill( this, level );

			if ( level == 0 || level == 1 )
				ItemValue = ItemValue.Common;
			else if ( level == 2 || level == 3 )
				ItemValue = ItemValue.Uncommon;
			else if ( level == 4 || level == 5 )
				ItemValue = ItemValue.Rare;
			else if ( level == 6 || level == 7 )
				ItemValue = ItemValue.Epic;
			else
				ItemValue = ItemValue.Legendary;
		}
開發者ID:romeov007,項目名稱:imagine-uo,代碼行數:26,代碼來源:TreasureMapChest.cs

示例11: PlayerVendor

        public PlayerVendor( Mobile owner, BaseHouse house )
        {
            Owner = owner;
            House = house;

            if ( BaseHouse.NewVendorSystem )
            {
                m_BankAccount = 0;
                m_HoldGold = 4;
            }
            else
            {
                m_BankAccount = 1000;
                m_HoldGold = 0;
            }

            ShopName = "Shop Not Yet Named";

            m_SellItems = new Hashtable();

            CantWalk = true;

            InitStats( 75, 75, 75 );
            InitBody();
            InitOutfit();

            TimeSpan delay = PayTimer.GetInterval();

            m_PayTimer = new PayTimer( this, delay );
            m_PayTimer.Start();

            m_NextPayTime = DateTime.Now + delay;
        }
開發者ID:cynricthehun,項目名稱:UOLegends,代碼行數:33,代碼來源:PlayerVendor.cs

示例12: Deserialize

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

            int version = reader.ReadInt();

            switch (version)
            {
                case 1:
                    {
                        m_Caster = (BaseCreature)reader.ReadMobile();

                        goto case 0;
                    }
                case 0:
                    {
                        m_End = reader.ReadDeltaTime();

                        m_Timer = new InternalTimer(this, TimeSpan.Zero, true, true);
                        m_Timer.Start();

                        break;
                    }
            }
        }
開發者ID:greeduomacro,項目名稱:dragonknights-uo,代碼行數:25,代碼來源:AOE.cs

示例13: OnTalk

		public override void OnTalk( PlayerMobile player, bool contextMenu )
		{
			QuestSystem qs = player.Quest;

			if ( qs is TheGraveDiggerQuest )
			{
				QuestObjective obj = qs.FindObjective( typeof( VincentsLittleGirlObjective ) );

				if ( obj != null && !obj.Completed )
				{
					obj.Complete();
					this.Say( "Sweetie that strange person over there is stairing at me." );
					if ( this.BoyFriend != null )
					{
						m_RespondTime = DateTime.Now + TimeSpan.FromSeconds( 1.0 );
						m_Timer = new InternalTimer( this.BoyFriend, player, m_RespondTime );
						m_Timer.Start();
						m_Player = player;
					}
				}
				else
				{
					this.Say( "Yes? can i help you?" );
				}
			}
		}
開發者ID:romeov007,項目名稱:imagine-uo,代碼行數:26,代碼來源:Linda.cs

示例14: PageEntry

        public PageEntry( Mobile sender, string message, PageType type )
        {
            m_Sender = sender;
            m_Sent = DateTime.Now;
            m_Message = Utility.FixHtml( message );
            m_Type = type;
            m_PageLocation = sender.Location;
            m_PageMap = sender.Map;

            PlayerMobile pm = sender as PlayerMobile;
            if ( pm != null && pm.SpeechLog != null && Array.IndexOf( SpeechLogAttachment, type ) >= 0 )
                m_SpeechLog = new List<SpeechLogEntry>( pm.SpeechLog );

            m_Timer = new InternalTimer( this );
            m_Timer.Start();

            StaffHistory history = Reports.Reports.StaffHistory;

            if ( history != null )
            {
                m_PageInfo = new PageInfo( this );

                history.AddPage( m_PageInfo );
            }
        }
開發者ID:kamronbatman,項目名稱:Defiance-AOS-Pre-2012,代碼行數:25,代碼來源:PageQueue.cs

示例15: IceSnow2

		public IceSnow2()
		{
			m_Decays = true;
			m_DecayTime = DateTime.Now + TimeSpan.FromMinutes( 2.0 );
			m_Timer = new InternalTimer( this, m_DecayTime );
			m_Timer.Start();
		}
開發者ID:ITLongwell,項目名稱:aedilis2server,代碼行數:7,代碼來源:Snow2.cs


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