public void CalRunTime(Vector3 curPos, NpcAttribute attr) { var runTime = (targetPos - curPos).magnitude / attr.GetSpeed(); runFrame = Util.FloatToFrame(runTime); }