当前位置: 首页>>代码示例>>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;未经允许,请勿转载。