Пример #1
0
        IEnumerator ShowPlaneFit(float waitTime, PludoPlane fitPlane, AsyncCallback call = null)
        {
            yield return(new WaitForSeconds(waitTime));

            var planeList = fitPlane.PlaneList.ToList();
            var count     = planeList.Count;

            YxDebug.LogError(string.Format("移动飞机的子飞机有{0}个", count));
            for (int i = 0; i < count; i++)
            {
                var plane = planeList[i];
                plane.PlaneListReset();
                plane.PlaneData.PlaneStateChange((int)EnumPlaneStatus.Fit);
                plane.Hide();
                _planeList.Add(plane);
            }
            if (gameObject.activeInHierarchy)
            {
                StartCoroutine(OnShowFitAction.WaitExcuteCalls());
            }
            FreshPlaneNum();
            yield return(new WaitForSeconds(FitAniTime));

            if (call != null)
            {
                call(null);
            }
        }
Пример #2
0
 public void ShowPlaneFit(int moveDistance, PludoPlane fitPlane, AsyncCallback call = null)
 {
     if (_fitCoroutine != null)
     {
         StopCoroutine(_fitCoroutine);
     }
     _fitCoroutine = StartCoroutine(ShowPlaneFit(GetWaitMoveTime(moveDistance), fitPlane, call));
 }
Пример #3
0
 private int PlaneMove(PludoPlane movePlane, PludoPlaneData newPlaneData, AsyncCallback call = null)
 {
     return(movePlane.PlaneMovePath(GetMovePath(newPlaneData.MovePath), true, call));
 }