设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索

场所移动进入加载画面插件

查看数: 2915 | 评论数: 2 | 收藏 4
关灯 | 提示:支持键盘翻页<-左 右->
    组图打开中,请稍候......
发布时间: 2017-3-12 11:34

正文摘要:

本帖最后由 789456qwe 于 2017-3-12 11:35 编辑 场所移动进入加载画面插件

回复

无光之火 发表于 2018-8-24 04:16:35
非常感谢!
axicc 发表于 2017-3-12 13:58:29
  1. #------------------------------------------------------------------------------
  2. # by 盡頭
  3. #------------------------------------------------------------------------------

  4. $加载开关 = 7      # 控制加载的开关

  5. class Interpreter
  6.   def command_201
  7.     #------------------------------------------------------------------------------#
  8.     if $game_switches[$加载开关] == true
  9.       $scene = Loading_bbaugle.new
  10.     end
  11.     #------------------------------------------------------------------------------#
  12.     if $game_temp.in_battle
  13.       return true
  14.     end
  15.     if $game_temp.player_transferring or
  16.        $game_temp.message_window_showing or
  17.        $game_temp.transition_processing
  18.       return false
  19.     end
  20.     $game_temp.player_transferring = true
  21.     if @parameters[0] == 0
  22.       $game_temp.player_new_map_id = @parameters[1]
  23.       $game_temp.player_new_x = @parameters[2]
  24.       $game_temp.player_new_y = @parameters[3]
  25.       $game_temp.player_new_direction = @parameters[4]
  26.     else
  27.       $game_temp.player_new_map_id = $game_variables[@parameters[1]]
  28.       $game_temp.player_new_x = $game_variables[@parameters[2]]
  29.       $game_temp.player_new_y = $game_variables[@parameters[3]]
  30.       $game_temp.player_new_direction = @parameters[4]
  31.     end
  32.     if $mini_map != nil
  33.       $mini_map.update_map
  34.     end
  35.     @index += 1
  36.     if @parameters[5] == 0
  37. #------------------------------------------------------------------------------
  38.       if $game_switches[$加载开关] == false
  39.         Graphics.freeze
  40.       end
  41. #------------------------------------------------------------------------------
  42.       $game_temp.transition_processing = true
  43.       $game_temp.transition_name = ""
  44.     end
  45.     return false
  46.   end
  47. end
  48. #------------------------------------------------------------------------------#
  49. #   加载画面
  50. #------------------------------------------------------------------------------#
  51. class Loading_bbaugle
  52.   def main
  53.     $load_time_bbaugle = 0 # 计时初始化
  54.     [url=home.php?mod=space&uid=37298]@Window[/url] = Window_Loading.new
  55.     Graphics.transition
  56.     loop do
  57.       @window.refresh
  58.       Graphics.update
  59.       Input.update
  60.       if $load_time_bbaugle >= 100
  61.         break
  62.       else
  63.         $load_time_bbaugle += 1
  64.       end
  65.     end
  66.     @window.dispose
  67.     $scene = Scene_Map.new
  68.   end
  69. end
  70. class Window_Loading < Window_Base
  71.   def initialize
  72.     super(0,0,640,480)
  73.     self.contents = Bitmap.new(640,480)
  74.     self.opacity = 0
  75.     [url=home.php?mod=space&uid=2542858]@load[/url] = Sprite.new
  76.     @load.bitmap = Bitmap.new(640,480)
  77.     @load.bitmap.font.size = 22
  78.     @load.bitmap.font.bold = true
  79.    
  80.     @cn = "加载中...."
  81.     @en = "Loading..."
  82.    
  83.     @cn_w = contents.text_size(@cn).width
  84.     @en_w = contents.text_size(@en).width
  85.     @cn_h = contents.text_size(@cn).height
  86.     @en_h = contents.text_size(@en).height
  87.    
  88.     @load.bitmap.draw_text(320-@cn_w,240-@cn_h,320,32,@cn)
  89.     @load.bitmap.draw_text(320-@en_w,260-@en_h,320,32,@en)
  90.    
  91.     refresh
  92.   end
  93.   def refresh
  94.     if @load.opacity == 0
  95.       [url=home.php?mod=space&uid=265358]@down[/url] = false
  96.       @up = true
  97.     elsif @load.opacity == 255
  98.       @up=false
  99.       @down = true
  100.     end
  101.     if @up == true
  102.       @load.opacity += 10
  103.     end
  104.     if @down == true
  105.       @load.opacity -= 10
  106.     end
  107.   end
  108. end
复制代码
拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-11-24 13:19

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表