protected void InitAnimationTimer()
	{
		if (m_Timer == null)
			m_Timer = new NcTimerTool();
		m_bEndAnimation = false;
		m_Timer.Start();
	}
示例#2
0
 public void Start()
 {
     this.m_bEnable         = true;
     this.m_fCurrentTime    = 0f;
     this.m_fLastEngineTime = NcTimerTool.GetEngineTime() - 1E-06f;
     this.UpdateTimer();
 }
 protected void InitAnimationTimer()
 {
     if (m_Timer == null)
     {
         m_Timer = new NcTimerTool();
     }
     m_bEndAnimation = false;
     m_Timer.Start();
 }
示例#4
0
 protected void InitAnimationTimer()
 {
     if (this.m_Timer == null)
     {
         this.m_Timer = new NcTimerTool();
     }
     this.m_bEndAnimation = false;
     this.m_Timer.Start();
 }
示例#5
0
    public float GetTime()
    {
        float engineTime = NcTimerTool.GetEngineTime();

        if (!this.m_bEnable && this.m_fPauseTime != engineTime)
        {
            this.m_fStartTime += NcTimerTool.GetEngineTime() - this.m_fPauseTime;
            this.m_fPauseTime  = engineTime;
        }
        return(NcTimerTool.GetEngineTime() - this.m_fStartTime);
    }
示例#6
0
    public float GetTime()
    {
        float fEngineTime = NcTimerTool.GetEngineTime();

        if (m_bEnable == false && m_fPauseTime != fEngineTime)
        {
            m_fStartTime += NcTimerTool.GetEngineTime() - m_fPauseTime;
            m_fPauseTime  = fEngineTime;
        }
        return(NcTimerTool.GetEngineTime() - m_fStartTime);
    }
示例#7
0
 private float UpdateTimer()
 {
     if (this.m_bEnable)
     {
         if (this.m_fLastEngineTime != NcTimerTool.GetEngineTime())
         {
             this.m_fLastTime       = this.m_fCurrentTime;
             this.m_fCurrentTime   += (NcTimerTool.GetEngineTime() - this.m_fLastEngineTime) * this.GetTimeScale();
             this.m_fLastEngineTime = NcTimerTool.GetEngineTime();
             if (this.m_fSmoothTimes != null)
             {
                 this.UpdateSmoothTime(this.m_fCurrentTime - this.m_fLastTime);
             }
         }
     }
     else
     {
         this.m_fLastEngineTime = NcTimerTool.GetEngineTime();
     }
     return(this.m_fCurrentTime);
 }
示例#8
0
 public void SetTimer(float fStartTime, float fRepeatTime, int nRepeatCount, object arg)
 {
     SetRelTimer(fStartTime - NcTimerTool.GetEngineTime(), fRepeatTime, nRepeatCount, arg);
 }
示例#9
0
 public void SetTimer(float fStartTime, float fRepeatTime, object arg)
 {
     this.SetRelTimer(fStartTime - NcTimerTool.GetEngineTime(), fRepeatTime, arg);
 }
示例#10
0
 public void SetTimer(float fStartTime, float fRepeatTime)
 {
     SetRelTimer(fStartTime - NcTimerTool.GetEngineTime(), fRepeatTime);
 }
示例#11
0
 // --------------------------------------------------------------------------
 public void SetTimer(float fStartTime, object arg)
 {
     SetRelTimer(fStartTime - NcTimerTool.GetEngineTime(), arg);
 }
示例#12
0
 public void Pause()
 {
     this.m_bEnable    = false;
     this.m_fPauseTime = NcTimerTool.GetEngineTime();
 }
示例#13
0
 // Control Function -----------------------------------------------------------------
 public void SetTimer(float fStartTime)
 {
     SetRelTimer(fStartTime - NcTimerTool.GetEngineTime());
 }
示例#14
0
 public void Start()
 {
     this.m_bEnable    = true;
     this.m_fStartTime = NcTimerTool.GetEngineTime() - 1E-06f;
 }
示例#15
0
 public void Reset(float fAdjustTime)
 {
     this.m_fStartTime = NcTimerTool.GetEngineTime() - fAdjustTime;
 }
示例#16
0
 public void SetTimer(float fStartTime, float fRandomTime, float fMinIntervalTime, int nRepeatCount, object arg)
 {
     this.SetRelTimer(fStartTime - NcTimerTool.GetEngineTime(), fRandomTime, fMinIntervalTime, nRepeatCount, arg);
 }
示例#17
0
 public void SetTimer(float fStartTime, float fRandomTime, float fMinIntervalTime)
 {
     this.SetRelTimer(fStartTime - NcTimerTool.GetEngineTime(), fRandomTime, fMinIntervalTime);
 }
示例#18
0
 public void Reset(float fElapsedTime)
 {
     this.m_fCurrentTime    = fElapsedTime;
     this.m_fLastEngineTime = NcTimerTool.GetEngineTime() - 1E-06f;
     this.UpdateTimer();
 }
示例#19
0
 public void SetTimer(float fStartTime, float fRepeatTime, int nRepeatCount)
 {
     this.SetRelTimer(fStartTime - NcTimerTool.GetEngineTime(), fRepeatTime, nRepeatCount);
 }
示例#20
0
 public void SetTimer(float fStartTime, float fRandomTime, float fMinIntervalTime, object arg)
 {
     SetRelTimer(fStartTime - NcTimerTool.GetEngineTime(), fRandomTime, fMinIntervalTime, arg);
 }
示例#21
0
 public void SetTimer(float fStartTime, float fRandomTime, float fMinIntervalTime, int nRepeatCount)
 {
     SetRelTimer(fStartTime - NcTimerTool.GetEngineTime(), fRandomTime, fMinIntervalTime, nRepeatCount);
 }
示例#22
0
 public bool IsUpdateTimer()
 {
     return(this.m_fLastEngineTime != NcTimerTool.GetEngineTime());
 }