查看: 3193|回复: 1

[已经解决] 有个开锁小游戏脚本,用的时候画面变黑,求改进

[复制链接]
梦石
0
星屑
433
在线时间
50 小时
注册时间
2017-1-10
回帖
16
发表于 2019-4-3 09:34:24 | 显示全部楼层 |阅读模式
悬赏50星屑已解决
本帖最后由 sezhiyang 于 2019-4-3 09:39 编辑

如题,有个盗贼开锁(迷你游戏) 脚本,大地图用的时候倒是正常,只是背景有些虚化,

但是在战斗中使用画面全黑,显示图片也会被覆盖,求会看脚本的前辈看看改哪里可以把背景设成透明,方便显示图片用


  1. #==============================================================================
  2. #
  3. # ■盗贼开锁(迷你游戏) □Ver1.01 □製作者:月紳士
  4. # RPGツクールVX Ace用 RGSS3スクリプト
  5. #
  6. #   ●…上書き ◎…エイリアス ○…新規と新規への上書き
  7. #
  8. #  ※二次配布禁止!配布元には利用規約があります。必ずそちらを見てください。
  9. #   作者主页:http://tsukishinshi.blog73.fc2.com/
  10. #==============================================================================
  11. =begin

  12.   创建一个开锁的场景,可以作为盗贼角色的迷你游戏。

  13. #------------------------------------------------------------------------------

  14.   使用脚本(详情在下面)后显示一个开锁场景。

  15.   指针左右往返移动,当指针移动到成功区域时,玩家按下确定键可以开锁。
  16.   开启所有锁孔时,开启一个开关,代表成功开锁。

  17.   失败后,开锁器(一个物品)会被消耗
  18.   失败后还可以再次尝试,只要你还有开锁器。

  19.   你也可以使用返回键退出开锁场景。

  20.   成功/失败时,会开启/关闭一个开关。(在下面设定)
  21.   可以在事件的分支条件里使用。

  22. #------------------------------------------------------------------------------
  23.   
  24.   使用脚本显示开锁画面

  25. call_picking(成功区域宽度, 速度, 锁孔数)

  26.      成功区域宽度    : 可以成功开锁的区域宽度。
  27.       速度            : 指针移动速度。
  28.       锁孔数          : 必须要成功多少回才能开锁。
  29.       
  30.   例子:

  31. call_picking(15, 2, 3)

  32.   这些参数决定了开锁的难易度

  33.   在测试工程时,可以使用以下操作:
  34.    上方向键 : 指针移动速度 + 0.5
  35.    下方向键 : 指针移动速度 - 0.5
  36.    左方向键 : 成功区域宽度 - 1
  37.    右方向键 : 成功区域宽度 + 1

  38.   便于你调整开锁的难易度。

  39.   建议使用变量来改变开锁的参数。

  40. =end

  41. module OpenLock_Of_TheThief
  42. #==============================================================================
  43. # □ 设定部分
  44. #==============================================================================

  45.   PICKING_SUCCESS_SWITCH_ID = 1
  46.   ## 开锁结果的开关id。
  47.    # 开锁成功后开关开启,否则开关关闭

  48.   LOCKPICK_ITEM_ID = 1
  49.   ## 开锁需要的物品的id(当做开锁器),开锁需要消耗该物品
  50.    # 开锁画面中会显示开锁器物品的图标。

  51.   CLOSE_PIN_ICON_ID = 126
  52.   OPEN_PIN_ICON_ID  = 125
  53.   ## 未解锁锁孔和已解锁锁孔的图标index。
  54.   
  55. end

  56. #==============================================================================
  57. # ■ Sound
  58. #------------------------------------------------------------------------------
  59. #  効果音を演奏するモジュールです。グローバル変数 $data_system からデータベー
  60. # スで設定された SE の内容を取得し、演奏します。
  61. #==============================================================================

  62. module Sound
  63.   
  64.   # 成功时播放的音效(开锁)
  65.   def self.play_lockpicking_success
  66.     Audio.se_play("Audio/SE/Key", 80, 100)
  67.   end

  68.   # 失败时播放的音效(消耗开锁器)
  69.   def self.play_lockpicking_failure
  70.     Audio.se_play("Audio/SE/Blow5", 80, 150)
  71.   end
  72.   
  73. end

  74. #==============================================================================
  75. # ■ Window_OpenLock_Status
  76. #------------------------------------------------------------------------------
  77. #  錠前破りシーンのステータスを表示するウインドウです。
  78. #==============================================================================

  79. class Window_OpenLock_Status < Window_Base
  80.   #--------------------------------------------------------------------------
  81.   # ● オブジェクト初期化
  82.   #-------------------------------------------------------------------------
  83.   def initialize(x, y, width, pin)
  84.     width += standard_padding * 2
  85.     x = (Graphics.width - width)   / 2        if x == :center # センタリング時
  86.     y = (Graphics.height - window_height) / 2 if y == :center # センタリング時
  87.     super(x, y, width, window_height)
  88.     self.opacity = 0
  89.     @pin = pin
  90.     create_pin
  91.     refresh
  92.   end
  93.   #--------------------------------------------------------------------------
  94.   # ● ウインドウの高さ
  95.   #--------------------------------------------------------------------------
  96.   def window_height
  97.     line_height * 4 + standard_padding * 2
  98.   end
  99.   #--------------------------------------------------------------------------
  100.   # 〇 ピンの作成
  101.   #--------------------------------------------------------------------------
  102.   def create_pin
  103.     @pin_status = Array.new(@pin, false)
  104.   end
  105.   #--------------------------------------------------------------------------
  106.   # 〇 ピンの解除
  107.   #--------------------------------------------------------------------------
  108.   def open_pin
  109.     return unless @pin_status.include?(false)
  110.     loop do
  111.       index = rand(@pin)
  112.       if @pin_status[index] == false
  113.         @pin_status[index] = true
  114.         break
  115.       end
  116.     end
  117.     refresh
  118.   end
  119.   #--------------------------------------------------------------------------
  120.   # 〇 開錠したか?
  121.   #--------------------------------------------------------------------------
  122.   def openlock?
  123.     !@pin_status.include?(false)
  124.   end
  125.   #--------------------------------------------------------------------------
  126.   # ● リフレッシュ
  127.   #--------------------------------------------------------------------------
  128.   def refresh
  129.     contents.clear
  130.     x = 0
  131.     @pin_status.each do |pin|
  132.       if pin
  133.         draw_icon(OpenLock_Of_TheThief::OPEN_PIN_ICON_ID, x, 0)
  134.       else
  135.         draw_icon(OpenLock_Of_TheThief::CLOSE_PIN_ICON_ID, x, 0)
  136.       end
  137.       x += 24
  138.     end
  139.     item = $data_items[OpenLock_Of_TheThief::LOCKPICK_ITEM_ID]
  140.     amount = $game_party.item_number(item)
  141.     x = contents_width - 40 - 35
  142.     draw_icon(item.icon_index, x, line_height * 3)
  143.     draw_text(0, line_height * 3, contents_width, line_height, "×  ", 2)
  144.     draw_text(0, line_height * 3, contents_width, line_height, amount, 2)
  145.   end
  146. end
  147. #==============================================================================
  148. # ■ Window_Movement_Bar
  149. #------------------------------------------------------------------------------
  150. #  移動するカーソルを指定された範囲で止めると成功扱いになるウインドウです。
  151. #==============================================================================

  152. class Window_Movement_Bar < Window_Base
  153.   #--------------------------------------------------------------------------
  154.   # ○ 公開インスタンス変数
  155.   #--------------------------------------------------------------------------
  156.   attr_accessor :speed                         # カーソルの移動速度
  157.   attr_reader   :safe_range_width              # 成功範囲の幅
  158.   #--------------------------------------------------------------------------
  159.   # ● オブジェクト初期化
  160.   #-------------------------------------------------------------------------
  161.   def initialize(x, y, width, safe_range_width, speed)
  162.     @safe_range_width = [safe_range_width, safe_range_min].max
  163.     @speed = speed
  164.     x = (Graphics.width - width)   / 2        if x == :center # センタリング時
  165.     y = (Graphics.height - window_height) / 2 if y == :center # センタリング時
  166.     super(x, y, width, window_height)
  167.     create_safe_range
  168.     create_original_cursor
  169.     @handler = {}
  170.     @post = 0
  171.     self.activate
  172.   end
  173.   #--------------------------------------------------------------------------
  174.   # ● 解放
  175.   #--------------------------------------------------------------------------
  176.   def dispose
  177.     super
  178.     @original_cursor.dispose unless @original_cursor.disposed?
  179.   end
  180.   #--------------------------------------------------------------------------
  181.   # ● ウインドウの高さ
  182.   #--------------------------------------------------------------------------
  183.   def window_height
  184.     line_height + standard_padding * 2
  185.   end
  186.   #--------------------------------------------------------------------------
  187.   # 〇 カーソルの幅
  188.   #--------------------------------------------------------------------------
  189.   def cursor_width
  190.     2
  191.   end
  192.   #--------------------------------------------------------------------------
  193.   # 〇 成功範囲の最低幅
  194.   #--------------------------------------------------------------------------
  195.   def safe_range_min
  196.     cursor_width + 2
  197.   end
  198.   #--------------------------------------------------------------------------
  199.   # 〇 カーソルの移動範囲
  200.   #--------------------------------------------------------------------------
  201.   def moving_range
  202.     contents_width - cursor_width
  203.   end
  204.   #--------------------------------------------------------------------------
  205.   # 〇 成功範囲配置時に両端から離す距離
  206.   #  ※ 移動範囲の両端に成功範囲が接すると簡単になってしまう為
  207.   #--------------------------------------------------------------------------
  208.   def safe_range_padding
  209.     cursor_width + 2
  210.   end
  211.   #--------------------------------------------------------------------------
  212.   # 〇 カーソル作成
  213.   #--------------------------------------------------------------------------
  214.   def create_original_cursor
  215.     @original_cursor = Sprite.new
  216.     @original_cursor.viewport = self.viewport
  217.     @original_cursor.bitmap = Bitmap.new(cursor_width, contents_height)
  218.     @original_cursor.bitmap.fill_rect(@original_cursor.bitmap.rect, crisis_color)
  219.     @original_cursor.x = self.x + standard_padding
  220.     @original_cursor.y = self.y + standard_padding
  221.     @original_cursor.z = self.z + 10
  222.   end
  223.   #--------------------------------------------------------------------------
  224.   # 〇 成功位置の作成
  225.   #--------------------------------------------------------------------------
  226.   def create_safe_range
  227.     contents.clear
  228.     first = safe_range_padding + rand(moving_range - @safe_range_width - safe_range_padding)
  229.     @safe_range =  Range.new(first, first + @safe_range_width)
  230.     contents.fill_rect(0, 2, contents_width, contents_height - 4, gauge_back_color)
  231.     contents.fill_rect(@safe_range.first + cursor_width, 2, @safe_range_width - cursor_width, contents_height - 4, mp_gauge_color1)
  232.   end
  233.   #--------------------------------------------------------------------------
  234.   # ● フレーム更新
  235.   #--------------------------------------------------------------------------
  236.   def update
  237.     process_cursor_move
  238.     super
  239.     process_handling
  240.   end
  241.   #--------------------------------------------------------------------------
  242.   # 〇 カーソルの座標
  243.   #--------------------------------------------------------------------------
  244.   def cursor_post
  245.     if @post > moving_range
  246.       return (@post - moving_range * 2).abs
  247.     else
  248.       return @post
  249.     end
  250.   end
  251.   #--------------------------------------------------------------------------
  252.   # ● カーソルの移動処理
  253.   #--------------------------------------------------------------------------
  254.   def process_cursor_move
  255.     @original_cursor.x = self.x + standard_padding
  256.     @original_cursor.y = self.y + standard_padding
  257.     @original_cursor.z = self.z + 10
  258.     return unless active
  259.     @post += @speed
  260.     @post = 0 if @post > moving_range * 2
  261.     @original_cursor.x = self.x + standard_padding + cursor_post
  262.   end
  263.   #--------------------------------------------------------------------------
  264.   # ● 動作に対応するハンドラの設定
  265.   #     method : ハンドラとして設定するメソッド (Method オブジェクト)
  266.   #--------------------------------------------------------------------------
  267.   def set_handler(symbol, method)
  268.     @handler[symbol] = method
  269.   end
  270.   #--------------------------------------------------------------------------
  271.   # ● ハンドラの存在確認
  272.   #--------------------------------------------------------------------------
  273.   def handle?(symbol)
  274.     @handler.include?(symbol)
  275.   end
  276.   #--------------------------------------------------------------------------
  277.   # ● ハンドラの呼び出し
  278.   #--------------------------------------------------------------------------
  279.   def call_handler(symbol)
  280.     @handler[symbol].call if handle?(symbol)
  281.   end
  282.   #--------------------------------------------------------------------------
  283.   # ● 決定やキャンセルなどのハンドリング処理
  284.   #--------------------------------------------------------------------------
  285.   def process_handling
  286.     return unless open? && active
  287.     return process_ok       if ok_enabled?        && Input.trigger?(:C)
  288.     return process_cancel   if cancel_enabled?    && Input.trigger?(:B)
  289.     return process_pagedown if handle?(:pagedown) && Input.trigger?(:R)
  290.     return process_pageup   if handle?(:pageup)   && Input.trigger?(:L)
  291.     return process_down     if handle?(:DOWN)     && Input.trigger?(:DOWN)
  292.     return process_up       if handle?(:UP)       && Input.trigger?(:UP)
  293.     return process_right    if handle?(:RIGHT)    && Input.trigger?(:RIGHT)
  294.     return process_left     if handle?(:LEFT)     && Input.trigger?(:LEFT)
  295.     return process_shift    if handle?(:shift)    && Input.trigger?(:A)
  296.   end
  297.   #--------------------------------------------------------------------------
  298.   # ● 決定処理の有効状態を取得
  299.   #--------------------------------------------------------------------------
  300.   def ok_enabled?
  301.     handle?(:ok)
  302.   end
  303.   #--------------------------------------------------------------------------
  304.   # ● キャンセル処理の有効状態を取得
  305.   #--------------------------------------------------------------------------
  306.   def cancel_enabled?
  307.     handle?(:cancel)
  308.   end
  309.   #--------------------------------------------------------------------------
  310.   # ● 決定ボタンが押されたときの処理
  311.   #--------------------------------------------------------------------------
  312.   def process_ok
  313.     Sound.play_ok
  314.     deactivate
  315.     Input.update
  316.     call_ok_handler
  317.   end
  318.   #--------------------------------------------------------------------------
  319.   # ● 決定ハンドラの呼び出し
  320.   #--------------------------------------------------------------------------
  321.   def call_ok_handler
  322.     call_handler(:ok)
  323.   end
  324.   #--------------------------------------------------------------------------
  325.   # ● キャンセルボタンが押されたときの処理
  326.   #--------------------------------------------------------------------------
  327.   def process_cancel
  328.     Sound.play_cancel
  329.     Input.update
  330.     deactivate
  331.     call_cancel_handler
  332.   end
  333.   #--------------------------------------------------------------------------
  334.   # ● キャンセルハンドラの呼び出し
  335.   #--------------------------------------------------------------------------
  336.   def call_cancel_handler
  337.     call_handler(:cancel)
  338.   end
  339.   #--------------------------------------------------------------------------
  340.   # ● L ボタン(PageUp)が押されたときの処理
  341.   #--------------------------------------------------------------------------
  342.   def process_pageup
  343.     Sound.play_cursor
  344.     Input.update
  345.     deactivate
  346.     call_handler(:pageup)
  347.   end
  348.   #--------------------------------------------------------------------------
  349.   # ● R ボタン(PageDown)が押されたときの処理
  350.   #--------------------------------------------------------------------------
  351.   def process_pagedown
  352.     Sound.play_cursor
  353.     Input.update
  354.     deactivate
  355.     call_handler(:pagedown)
  356.   end
  357.   #--------------------------------------------------------------------------
  358.   # ○ 下キーが押されたときの処理
  359.   #--------------------------------------------------------------------------
  360.   def process_down
  361.     Input.update
  362.     call_handler(:DOWN)
  363.   end
  364.   #--------------------------------------------------------------------------
  365.   # ○ 上キーが押されたときの処理
  366.   #--------------------------------------------------------------------------
  367.   def process_up
  368.     Input.update
  369.     call_handler(:UP)
  370.   end
  371.   #--------------------------------------------------------------------------
  372.   # ○ 右キーが押されたときの処理
  373.   #--------------------------------------------------------------------------
  374.   def process_right
  375.     Input.update
  376.     call_handler(:RIGHT)
  377.   end
  378.   #--------------------------------------------------------------------------
  379.   # ○ 左キーが押されたときの処理
  380.   #--------------------------------------------------------------------------
  381.   def process_left
  382.     Input.update
  383.     call_handler(:LEFT)
  384.   end
  385.   #--------------------------------------------------------------------------
  386.   # ○ A ボタン(Shift)が押されたときの処理
  387.   #--------------------------------------------------------------------------
  388.   def process_shift
  389.     Input.update
  390.     call_handler(:shift)
  391.   end
  392.   #--------------------------------------------------------------------------
  393.   # ● リフレッシュ
  394.   #--------------------------------------------------------------------------
  395.   def refresh
  396.     contents.clear
  397.     draw_all_items
  398.   end
  399.   #--------------------------------------------------------------------------
  400.   # ○ 成功範囲を狭く作り直す
  401.   #--------------------------------------------------------------------------
  402.   def safe_range_narrow
  403.     @safe_range_width = [safe_range_min, @safe_range_width - 1].max
  404.     create_safe_range
  405.   end
  406.   #--------------------------------------------------------------------------
  407.   # ○ 成功範囲を広く作り直す
  408.   #--------------------------------------------------------------------------
  409.   def safe_range_wide
  410.     @safe_range_width += 1
  411.     create_safe_range
  412.   end
  413. end

  414. #==============================================================================
  415. # ■ Window_Picking
  416. #------------------------------------------------------------------------------
  417. #  錠前破りシーンで成否判定を行う為のウインドウです。
  418. #==============================================================================

  419. class Window_Picking < Window_Movement_Bar
  420.   #--------------------------------------------------------------------------
  421.   # ● 決定ボタンが押されたときの処理
  422.   #--------------------------------------------------------------------------
  423.   def process_ok
  424.     if $game_party.has_item?($data_items[OpenLock_Of_TheThief::LOCKPICK_ITEM_ID])
  425.       if @safe_range.include?(cursor_post)
  426.         Sound.play_lockpicking_success
  427.         @status_window.open_pin
  428.         Graphics.wait(20)
  429.         if @status_window.openlock?
  430.           Graphics.wait(20)
  431.         else
  432.           create_safe_range
  433.         end
  434.       else
  435.         Sound.play_lockpicking_failure
  436.         $game_party.gain_item($data_items[OpenLock_Of_TheThief::LOCKPICK_ITEM_ID], -1)
  437.         @status_window.refresh
  438.         Graphics.wait(20)
  439.       end
  440.       call_ok_handler
  441.     else
  442.       Sound.play_buzzer
  443.     end
  444.   end
  445.   #--------------------------------------------------------------------------
  446.   # ○ ステータスウインドウの設定
  447.   #--------------------------------------------------------------------------
  448.   def status_window=(status_window)
  449.     @status_window = status_window
  450.   end
  451. end

  452. #==============================================================================
  453. # ■ Scene_Picking
  454. #------------------------------------------------------------------------------
  455. #  宝箱や扉の錠破りを行うシーンです。
  456. #==============================================================================

  457. class Scene_Picking < Scene_MenuBase
  458.   #--------------------------------------------------------------------------
  459.   # ● 開始処理
  460.   #--------------------------------------------------------------------------
  461.   def start
  462.     super
  463.     create_windows
  464.   end
  465.   #--------------------------------------------------------------------------
  466.   # ● 準備
  467.   #--------------------------------------------------------------------------
  468.   def prepare(width, safe_range_width, speed, pin)
  469.     @width = width
  470.     @safe_range_width = safe_range_width
  471.     @speed = speed
  472.     @pin = pin
  473.   end
  474.   #--------------------------------------------------------------------------
  475.   # ○ ウィンドウの作成
  476.   #--------------------------------------------------------------------------
  477.   def create_windows
  478.     create_status_window
  479.     create_picking_window
  480.   end
  481.   #--------------------------------------------------------------------------
  482.   # ○ ステータスウインドウの作成
  483.   #--------------------------------------------------------------------------
  484.   def create_status_window
  485.     wx = :center
  486.     wy = :center
  487.     @status_window = Window_OpenLock_Status.new(wx, wy, @width, @pin)
  488.   end
  489.   #--------------------------------------------------------------------------
  490.   # ○ 錠前破り判定ウインドウの作成
  491.   #--------------------------------------------------------------------------
  492.   def create_picking_window
  493.     wx = :center
  494.     wy = :center
  495.     @picking_window = Window_Picking.new(wx, wy, @width, @safe_range_width, @speed)
  496.     @picking_window.set_handler(:ok,       method(:on_picking_window_ok))
  497.     @picking_window.set_handler(:cancel,   method(:on_picking_window_cancel))
  498.     @picking_window.set_handler(:UP,       method(:speed_up)) if $TEST
  499.     @picking_window.set_handler(:DOWN,     method(:speed_down)) if $TEST
  500.     @picking_window.set_handler(:LEFT,     method(:safe_range_narrow)) if $TEST
  501.     @picking_window.set_handler(:RIGHT,    method(:safe_range_wide)) if $TEST
  502.     @picking_window.status_window = @status_window
  503.   end
  504.   #--------------------------------------------------------------------------
  505.   # ○ スピードアップ(テスト用)
  506.   #--------------------------------------------------------------------------
  507.   def speed_up
  508.     Sound.play_cursor
  509.     @picking_window.speed += 0.5
  510.     p @picking_window.speed
  511.   end
  512.   #--------------------------------------------------------------------------
  513.   # ○ スピードダウン(テスト用)
  514.   #--------------------------------------------------------------------------
  515.   def speed_down
  516.     Sound.play_cursor
  517.     @picking_window.speed = [0.5, @picking_window.speed - 0.5].max
  518.     p @picking_window.speed
  519.   end
  520.   #--------------------------------------------------------------------------
  521.   # ○ 成功範囲を狭める(テスト用)
  522.   #--------------------------------------------------------------------------
  523.   def safe_range_narrow
  524.     Sound.play_cursor
  525.     @picking_window.safe_range_narrow
  526.     p @picking_window.safe_range_width
  527.   end
  528.   #--------------------------------------------------------------------------
  529.   # ○ 成功範囲を広げる(テスト用)
  530.   #--------------------------------------------------------------------------
  531.   def safe_range_wide
  532.     Sound.play_cursor
  533.     @picking_window.safe_range_wide
  534.     p @picking_window.safe_range_width
  535.   end
  536.   #--------------------------------------------------------------------------
  537.   # ○ 錠前破り判定
  538.   #--------------------------------------------------------------------------
  539.   def on_picking_window_ok
  540.     if @status_window.openlock?
  541.       $game_switches[OpenLock_Of_TheThief::PICKING_SUCCESS_SWITCH_ID] = true
  542.       return_scene
  543.     end
  544.   end
  545.   #--------------------------------------------------------------------------
  546.   # ○ 錠前破りを止める
  547.   #--------------------------------------------------------------------------
  548.   def on_picking_window_cancel
  549.     $game_switches[OpenLock_Of_TheThief::PICKING_SUCCESS_SWITCH_ID] = false
  550.     return_scene
  551.   end
  552. end

  553. #==============================================================================
  554. # ■ Game_Interpreter
  555. #------------------------------------------------------------------------------
  556. #  イベントコマンドを実行するインタプリタです。このクラスは Game_Map クラス、
  557. # Game_Troop クラス、Game_Event クラスの内部で使用されます。
  558. #==============================================================================

  559. class Game_Interpreter
  560.   #--------------------------------------------------------------------------
  561.   # ○ 錠前破りシーンの呼び出し
  562.   #--------------------------------------------------------------------------
  563.   def call_picking(safe_range_width, speed, pin)
  564.     SceneManager.call(Scene_Picking)
  565.     SceneManager.scene.prepare(200, safe_range_width, speed, pin)
  566.     Fiber.yield
  567.   end
  568. end
复制代码

最佳答案

查看完整内容

这个是只能在地图上使用, 因为它是scene, 会和战斗的 scene_battle 冲突
梦石
0
星屑
42345
在线时间
6022 小时
注册时间
2006-11-10
回帖
6975
发表于 2019-4-3 09:34:25 | 显示全部楼层
本帖最后由 灯笼菜刀王 于 2019-4-3 11:22 编辑

  这个是只能在地图上使用, 因为它是scene, 会和战斗的 scene_battle 冲突

回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部