Exemple #1
0
 void Update()
 {
     if (!m_bCanMove)
     {
         m_bCanMove = DequeuePoint();
         if (!m_bCanMove)
         {
             return;
         }
     }
     else
     {
         m_fLerpTime += Time.deltaTime;
         if (m_fLerpTime > m_fAverageTime)
         {
             m_fLerpTime     -= m_fAverageTime;
             m_sStartPosition = m_sNextPosition;
             m_bCanMove       = DequeuePoint();
             if (m_bCanMove)
             {
                 LerpPosition();
             }
             else
             {
                 SetPosition(m_sNextPosition);
                 m_fLerpTime = 0;
                 CLog.LogColorArgs(CLogColor.Red, "wait");
             }
         }
         else
         {
             LerpPosition();
         }
     }
 }
Exemple #2
0
 public override BTActionResult OnRun(SkillBlackBoard blackBoard)
 {
     m_nTimes--;
     CLog.LogColorArgs(CLogColor.Red, skillData.desc);
     if (m_nTimes > 0)
     {
         return(BTActionResult.Running);
     }
     return(BTActionResult.Ready);
 }