赞 | 0 |
VIP | 0 |
好人卡 | 9 |
积分 | 1 |
经验 | 13328 |
最后登录 | 2023-2-12 |
在线时间 | 278 小时 |
Lv1.梦旅人 尽头
- 梦石
- 0
- 星屑
- 119
- 在线时间
- 278 小时
- 注册时间
- 2010-6-20
- 帖子
- 1280
|
- # by bbaugle
- $加载开关 = 7 # 控制加载的开关
- class Interpreter
- def command_201
- #------------------------------------------------------------------------------#
- if $game_switches[$加载开关] == true
- $scene = Loading_bbaugle.new
- end
- #------------------------------------------------------------------------------#
- if $game_temp.in_battle
- return true
- end
- if $game_temp.player_transferring or
- $game_temp.message_window_showing or
- $game_temp.transition_processing
- return false
- end
- $game_temp.player_transferring = true
- if @parameters[0] == 0
- $game_temp.player_new_map_id = @parameters[1]
- $game_temp.player_new_x = @parameters[2]
- $game_temp.player_new_y = @parameters[3]
- $game_temp.player_new_direction = @parameters[4]
- else
- $game_temp.player_new_map_id = $game_variables[@parameters[1]]
- $game_temp.player_new_x = $game_variables[@parameters[2]]
- $game_temp.player_new_y = $game_variables[@parameters[3]]
- $game_temp.player_new_direction = @parameters[4]
- end
- @index += 1
- if @parameters[5] == 0
- #------------------------------------------------------------------------------
- if $game_switches[$加载开关] == false
- Graphics.freeze
- end
- #------------------------------------------------------------------------------
- $game_temp.transition_processing = true
- $game_temp.transition_name = ""
- end
- return false
- end
- end
- #------------------------------------------------------------------------------#
- # 加载画面
- #------------------------------------------------------------------------------#
- class Loading_bbaugle
- def main
- $load_time_bbaugle = 0 # 计时初始化
- @window = Window_Loading.new
- Graphics.transition
- loop do
- @window.refresh
- Graphics.update
- Input.update
- if $load_time_bbaugle >= 100
- break
- else
- $load_time_bbaugle += 1
- end
- end
- @window.dispose
- $scene = Scene_Map.new
- end
- end
- class Window_Loading < Window_Base
- def initialize
- super(0,0,640,480)
- self.contents = Bitmap.new(640,480)
- self.opacity = 0
- @load = Sprite.new
- @load.bitmap = Bitmap.new(640,480)
- @load.bitmap.font.size = 22
- @load.bitmap.font.bold = true
-
- @cn = "加载中...."
- @en = "Loading..."
-
- @cn_w = contents.text_size(@cn).width
- @en_w = contents.text_size(@en).width
- @cn_h = contents.text_size(@cn).height
- @en_h = contents.text_size(@en).height
-
- @load.bitmap.draw_text(320-@cn_w,240-@cn_h,320,32,@cn)
- @load.bitmap.draw_text(320-@en_w,260-@en_h,320,32,@en)
-
- refresh
- end
- def refresh
- if @load.opacity == 0
- @down = false
- @up = true
- elsif @load.opacity == 255
- @up=false
- @down = true
- end
- if @up == true
- @load.opacity += 10
- end
- if @down == true
- @load.opacity -= 10
- end
- end
- end
复制代码 需要加载的时候把 7 号开关打开就OK了 |
|