Beispiel #1
0
		public static void Register( DecayLevel level, TimeSpan min, TimeSpan max )
		{
			DecayStageInfo info = new DecayStageInfo( min, max );

			if ( m_Stages.ContainsKey( level ) )
				m_Stages[level] = info;
			else
				m_Stages.Add( level, info );
		}
Beispiel #2
0
        public static TimeSpan GetRandomDuration(DecayLevel level)
        {
            if (!m_Stages.ContainsKey(level))
            {
                return(TimeSpan.Zero);
            }

            DecayStageInfo info = m_Stages[level];
            long           min  = info.MinDuration.Ticks;
            long           max  = info.MaxDuration.Ticks;

            return(TimeSpan.FromTicks(min + (long)(Utility.RandomDouble() * (max - min))));
        }
Beispiel #3
0
        public static void Register(DecayLevel level, TimeSpan min, TimeSpan max)
        {
            DecayStageInfo info = new DecayStageInfo(min, max);

            if (m_Stages.ContainsKey(level))
            {
                m_Stages[level] = info;
            }
            else
            {
                m_Stages.Add(level, info);
            }
        }
Beispiel #4
0
 public static void Register(DecayLevel level, TimeSpan min, TimeSpan max)
 {
     m_Stages[level] = new DecayStageInfo(min, max);
 }