void StopCurrentPath(HUMANSTATE prev) { switch (prev) { case HUMANSTATE.LINE: linePath.StopPath(); break; case HUMANSTATE.SQUARE: squarePath.StopPath(); break; default: break; } }