class Game_Player < Game_Character
  def update_move
    # 移动速度转换为地图坐标系的移动距离
    distance = 2 ** @move_speed
    distance *= 2 if Input.press?(Input::SHIFT)
    # 理论坐标在实际坐标下方的情况下
    if @y * 128 > @real_y
      # 向下移动
      @real_y = [@real_y + distance, @y * 128].min
    end
    # 理论坐标在实际坐标左方的情况下
    if @x * 128 < @real_x
      # 向左移动
      @real_x = [@real_x - distance, @x * 128].max
    end
    # 理论坐标在实际坐标右方的情况下
    if @x * 128 > @real_x
      # 向右移动
      @real_x = [@real_x + distance, @x * 128].min
    end
    # 理论坐标在实际坐标上方的情况下
    if @y * 128 < @real_y
      # 向上移动
      @real_y = [@real_y - distance, @y * 128].max
    end
    # 移动时动画为 ON 的情况下
    if @walk_anime
      # 动画计数增加 1.5
      @anime_count += 1.5
    # 移动时动画为 OFF、停止时动画为 ON 的情况下
    elsif @step_anime
      # 动画计数增加 1
      @anime_count += 1
    end
  end
end
class Game_Player < Game_Character
  def update_move
    # 移动速度转换为地图坐标系的移动距离
    distance = 2 ** @move_speed
    distance *= 2 if Input.press?(Input::SHIFT)
    # 理论坐标在实际坐标下方的情况下
    if @y * 128 > @real_y
      # 向下移动
      @real_y = [@real_y + distance, @y * 128].min
    end
    # 理论坐标在实际坐标左方的情况下
    if @x * 128 < @real_x
      # 向左移动
      @real_x = [@real_x - distance, @x * 128].max
    end
    # 理论坐标在实际坐标右方的情况下
    if @x * 128 > @real_x
      # 向右移动
      @real_x = [@real_x + distance, @x * 128].min
    end
    # 理论坐标在实际坐标上方的情况下
    if @y * 128 < @real_y
      # 向上移动
      @real_y = [@real_y - distance, @y * 128].max
    end
    # 移动时动画为 ON 的情况下
    if @walk_anime
      # 动画计数增加 1.5
      @anime_count += 1.5
    # 移动时动画为 OFF、停止时动画为 ON 的情况下
    elsif @step_anime
      # 动画计数增加 1
      @anime_count += 1
    end
  end
end