private IEnumerator plusSmoothTask(float dH) { float lastDh = dH; while (Mathf.Abs(lastDh) > 0) { float mh = 0; if (Mathf.Abs(lastDh) <= list.getContainerHeight()) { mh = lastDh; } else { mh = dH > 0 ? list.getContainerHeight() : -list.getContainerHeight(); } float orgLDH = lastDh; lastDh = lastDh - mh; list.plusY(mh, false); //Debug.Log("lastDh="+ lastDh+ " orgLDH="+ orgLDH+ " mh="+ mh); yield return(0); } }
private void plusY(float d) { Vector3 v3 = new Vector3(0, d, 0); listView.plusY(v3.y); }