Example #1
0
 public override void NDFixedUpdate(float deltaTime)
 {
     if (isAppear)
     {
         if (CurrentAction.IsDone())
         {
             isAppear      = false;
             CurrentAction = null;
             MoveAI.SetBornPos(m_bornpos, 0);
         }
         else
         {
             CurrentAction.Update();
         }
     }
 }
Example #2
0
 public void SetBornPos(Int2 BornPos, int deep)
 {
     if (m_Attr.AttrType == 3000)
     {
         isAppear      = true;
         CurrentAction = new GridActionCmd3000Appear(MapGrid.GetMG(BornPos).WorldPos);
         CurrentAction.SetTarget(this);
     }
     else if (m_Attr.AttrType == 200003)
     {
         isAppear        = true;
         m_CurrentAction = new GridActionCmd200003FindTarget();
         m_CurrentAction.SetTarget(this);
     }
     else
     {
         isAppear      = false;
         CurrentAction = null;
         MoveAI.SetBornPos(m_bornpos, 0);
     }
     m_bornpos = BornPos;
 }