>>853
if(myPos.x > targetPos.x) myPos.x --
else if(myPos.x < targetPos.x)myPos.x ++

yも以下同様