예제 #1
0
 public InternalTimer(SpinalTapBandana item, TimeSpan next, String shit) : base(next)
 {
     m_item = item;
     order  = shit;                                                //Populate the variable m_item to be the Item that sent the timer
     //This section of assigning timer priority came from the RunUO Distro script:
     if (next >= TwoMinutes)                                       //If the TimeSpan next is greater than or equal to TwoMinutes
     {
         Priority = TimerPriority.OneMinute;                       //This timer's priority is OneMinute
     }
     else if (next >= ThirtySeconds)                               //the rest of this section reads in the same way, just different values
     {
         Priority = TimerPriority.FiveSeconds;
     }
     else if (next >= TenSeconds)
     {
         Priority = TimerPriority.OneSecond;
     }
     else if (next >= OneSecond)
     {
         Priority = TimerPriority.TwoFiftyMS;
     }
     else
     {
         Priority = TimerPriority.TwentyFiveMS;                          //This is called if next is less than OneSecond
     }
 }
예제 #2
0
            public InternalTimer( SpinalTapBandana item, TimeSpan next, String shit ): base( next )
            {
                m_item = item;     
                order = shit;                                                 //Populate the variable m_item to be the Item that sent the timer
                                                                                    //This section of assigning timer priority came from the RunUO Distro script: 
                if ( next >= TwoMinutes )                                           //If the TimeSpan next is greater than or equal to TwoMinutes
                    Priority = TimerPriority.OneMinute;                             //This timer's priority is OneMinute
                else if ( next >= ThirtySeconds )                                   //the rest of this section reads in the same way, just different values
                    Priority = TimerPriority.FiveSeconds;
                else if ( next >= TenSeconds )
                    Priority = TimerPriority.OneSecond;
                else if ( next >= OneSecond )
                    Priority = TimerPriority.TwoFiftyMS;
                else
                    Priority = TimerPriority.TwentyFiveMS;                          //This is called if next is less than OneSecond
			}